Page MenuHomePhabricator
Feed Advanced Search

Fri, Nov 20

pcc added a comment to D91824: [scudo] Avoid polluting the TLS slot used by libc-scudo.

Can we not just drop support for Android in non-standalone Scudo? As far as I know it is only being used (if at all) on a limited set of platforms which does not include Android.

Fri, Nov 20, 7:30 PM · Restricted Project
pcc accepted D91825: [hwasan] Implement error report callback..

LGTM

Fri, Nov 20, 4:21 PM · Restricted Project

Thu, Nov 19

pcc added a comment to D91583: [lld] Allow --export-dynamic to override --lto-whole-program-visibility.
In D91583#2404519, @pcc wrote:

I've said before that I think that --lto-whole-program-visibility should relax visibility of vtable symbols etc to hidden. That way, --export-dynamic wouldn't actually allow you to make this kind of mistake.

That would presumably result in an error in some of the problematic cases, whereas here we want to simply suppress --lto-whole-program-visibility to avoid any issues automatically.

But isn't it the case that you don't even need for the vtable symbol itself to be exported in order to derive from the class and override its virtual methods?

Thu, Nov 19, 10:08 AM · Restricted Project

Wed, Nov 18

pcc added a comment to D91583: [lld] Allow --export-dynamic to override --lto-whole-program-visibility.

I've said before that I think that --lto-whole-program-visibility should relax visibility of vtable symbols etc to hidden. That way, --export-dynamic wouldn't actually allow you to make this kind of mistake.

Wed, Nov 18, 7:45 PM · Restricted Project

Mon, Nov 16

pcc added a comment to D91555: [Support] Allow customizing the cache pruning prefix.

What is the use case?

Mon, Nov 16, 11:19 AM · Restricted Project

Fri, Nov 13

pcc added a comment to D91466: [WIP][clang][Fuchsia] Support HWASan for Fuchsia.

How does Zircon handle tagged addresses in syscalls? Are they handled equivalently to Linux's tagged address ABI?

Fri, Nov 13, 4:11 PM · Restricted Project, Restricted Project

Tue, Nov 10

pcc accepted D91208: [hwasan] Fix Thread reuse..

LGTM

Tue, Nov 10, 4:19 PM · Restricted Project
pcc committed rG0ae2ea8f83e3: hwasan: Bring back operator {new,delete} interceptors on Android. (authored by pcc).
hwasan: Bring back operator {new,delete} interceptors on Android.
Tue, Nov 10, 4:06 PM
pcc closed D91219: hwasan: Bring back operator {new,delete} interceptors on Android..
Tue, Nov 10, 4:05 PM · Restricted Project
pcc requested review of D91219: hwasan: Bring back operator {new,delete} interceptors on Android..
Tue, Nov 10, 3:55 PM · Restricted Project
pcc committed rGc052510c0b0d: gn build: (manually) Port ae032e27 and 21f83113. (authored by pcc).
gn build: (manually) Port ae032e27 and 21f83113.
Tue, Nov 10, 3:51 PM

Thu, Nov 5

pcc accepted D90700: [scudo][standalone] Simplify populateFreelist.
Thu, Nov 5, 3:02 PM · Restricted Project
pcc added a comment to D90700: [scudo][standalone] Simplify populateFreelist.

With this change we will end up with blocks distributed randomly among all of the transfer batches that we create at one time instead of having all of a transfer batch's blocks be consecutive. So we improve randomness at the cost of some locality which could impact performance. I'd be fine with letting this land though and we can see if it significantly impacts performance in practice once it's picked up downstream.

Thu, Nov 5, 3:02 PM · Restricted Project
pcc committed rGee7b629df271: scudo: Don't memset previously released cached pages in the secondary allocator. (authored by pcc).
scudo: Don't memset previously released cached pages in the secondary allocator.
Thu, Nov 5, 9:25 AM
pcc closed D90814: scudo: Don't memset previously released cached pages in the secondary allocator..
Thu, Nov 5, 9:25 AM · Restricted Project

Wed, Nov 4

pcc requested review of D90814: scudo: Don't memset previously released cached pages in the secondary allocator..
Wed, Nov 4, 7:18 PM · Restricted Project

Tue, Nov 3

pcc added a comment to D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version.

I agree with @MaskRay that this should be a binutils-specific option. The flag -mlinker-version seems to have been designed around macOS-specific assumptions i.e. there is a single linker (ld64) and that the linker and assembler are not version coupled. Having this option be binutils-specific seems like the best way to reflect the binutils-specific requirements.

Tue, Nov 3, 1:18 PM · Restricted Project, Restricted Project

Fri, Oct 30

pcc committed rG3d049bce98ce: hwasan: Support for outlined checks in the Linux kernel. (authored by pcc).
hwasan: Support for outlined checks in the Linux kernel.
Fri, Oct 30, 2:26 PM
pcc closed D90426: hwasan: Support for outlined checks in the Linux kernel..
Fri, Oct 30, 2:26 PM · Restricted Project
pcc added inline comments to D90070: [TTI] Add optional VecPred argument to getCmpSelInstrCost..
Fri, Oct 30, 2:07 PM · Restricted Project
pcc committed rG0930763b4baf: hwasan: Move fixed shadow behind opaque no-op cast as well. (authored by pcc).
hwasan: Move fixed shadow behind opaque no-op cast as well.
Fri, Oct 30, 1:24 PM
pcc closed D90425: hwasan: Move fixed shadow behind opaque no-op cast as well..
Fri, Oct 30, 1:24 PM · Restricted Project
pcc added inline comments to D90425: hwasan: Move fixed shadow behind opaque no-op cast as well..
Fri, Oct 30, 1:05 PM · Restricted Project
pcc committed rGc9b1a2b41dca: AArch64: Use SBFX instead of UBFX to extract address granule in outlined HWASan… (authored by pcc).
AArch64: Use SBFX instead of UBFX to extract address granule in outlined HWASan…
Fri, Oct 30, 12:54 PM
pcc closed D90424: AArch64: Use SBFX instead of UBFX to extract address granule in outlined HWASan checks..
Fri, Oct 30, 12:54 PM · Restricted Project, Restricted Project
pcc committed rG3859fc653fb4: AArch64: Switch to x20 as the shadow base register for outlined HWASan checks. (authored by pcc).
AArch64: Switch to x20 as the shadow base register for outlined HWASan checks.
Fri, Oct 30, 12:52 PM
pcc closed D90422: AArch64: Switch to x20 as the shadow base register for outlined HWASan checks..
Fri, Oct 30, 12:52 PM · Restricted Project, Restricted Project, Restricted Project
pcc added a comment to D46791: Make -gsplit-dwarf generally available.

Correct, clang no longer uses objcopy for this as of D47093.

Fri, Oct 30, 8:16 AM

Thu, Oct 29

pcc added inline comments to D90426: hwasan: Support for outlined checks in the Linux kernel..
Thu, Oct 29, 6:21 PM · Restricted Project
pcc updated the diff for D90426: hwasan: Support for outlined checks in the Linux kernel..

Revert unnecessary change, fix tests

Thu, Oct 29, 3:38 PM · Restricted Project
pcc added a comment to D90422: AArch64: Switch to x20 as the shadow base register for outlined HWASan checks..

For the kernel I measured a small regression in boot time (with a version of this change that uses x20 for the v1 checks as well since the kernel doesn't use short granules yet) -- from 6.65s to 6.70s or 0.8%. But that's a fraction of the size gains which were 4% for kernel and (as mentioned) 3% for userspace.

Thu, Oct 29, 3:28 PM · Restricted Project, Restricted Project, Restricted Project
pcc added inline comments to D90426: hwasan: Support for outlined checks in the Linux kernel..
Thu, Oct 29, 2:45 PM · Restricted Project
pcc requested review of D90426: hwasan: Support for outlined checks in the Linux kernel..
Thu, Oct 29, 1:58 PM · Restricted Project
pcc requested review of D90425: hwasan: Move fixed shadow behind opaque no-op cast as well..
Thu, Oct 29, 1:55 PM · Restricted Project
pcc requested review of D90424: AArch64: Use SBFX instead of UBFX to extract address granule in outlined HWASan checks..
Thu, Oct 29, 1:54 PM · Restricted Project, Restricted Project
pcc requested review of D90422: AArch64: Switch to x20 as the shadow base register for outlined HWASan checks..
Thu, Oct 29, 1:53 PM · Restricted Project, Restricted Project, Restricted Project

Wed, Oct 28

pcc added a comment to D89827: hwasan: Disable operator {new,delete} interceptors when interceptors are disabled..
Wed, Oct 28, 3:47 PM · Restricted Project
pcc committed rG864b3a336b60: Reland "hwasan: Disable operator {new,delete} interceptors when interceptors… (authored by pcc).
Reland "hwasan: Disable operator {new,delete} interceptors when interceptors…
Wed, Oct 28, 3:45 PM
pcc committed rG19cfe5a6debb: gn build: Define HWASAN_WITH_INTERCEPTORS=1 for hwasan_new_delete.cpp as well. (authored by pcc).
gn build: Define HWASAN_WITH_INTERCEPTORS=1 for hwasan_new_delete.cpp as well.
Wed, Oct 28, 3:45 PM

Oct 23 2020

pcc committed rGfa66bcf4bc94: hwasan: Disable operator {new,delete} interceptors when interceptors are… (authored by pcc).
hwasan: Disable operator {new,delete} interceptors when interceptors are…
Oct 23 2020, 9:04 PM
pcc closed D89827: hwasan: Disable operator {new,delete} interceptors when interceptors are disabled..
Oct 23 2020, 9:04 PM · Restricted Project
pcc added inline comments to D90004: Set default ndk version to 21..
Oct 23 2020, 4:53 PM · Restricted Project

Oct 20 2020

pcc requested review of D89827: hwasan: Disable operator {new,delete} interceptors when interceptors are disabled..
Oct 20 2020, 2:37 PM · Restricted Project
pcc committed rGc5acd3490b79: Driver: Add integer sanitizers to trapping group automatically. (authored by pcc).
Driver: Add integer sanitizers to trapping group automatically.
Oct 20 2020, 1:46 PM
pcc closed D89766: Driver: Add integer sanitizers to trapping group automatically..
Oct 20 2020, 1:46 PM · Restricted Project

Oct 19 2020

pcc requested review of D89766: Driver: Add integer sanitizers to trapping group automatically..
Oct 19 2020, 11:23 PM · Restricted Project
pcc accepted D89750: [hwasan] Increase max allocation size to 1Tb..

I think it's good to have a limit so that allocation attempts with obviously wrong sizes are rejected with a clear message.

Oct 19 2020, 5:21 PM · Restricted Project
pcc added a comment to D89750: [hwasan] Increase max allocation size to 1Tb..

Do we even need a limit at this level any more if the implementation supports up to 2^63 sizes? I guess any address-space imposed limit would be enforced by mmap failing when we go to make a large secondary allocation.

Oct 19 2020, 5:08 PM · Restricted Project

Oct 2 2020

pcc committed rGa8938f3da319: scudo: Simplify AtomicOptions::setFillContentsMode. NFCI. (authored by pcc).
scudo: Simplify AtomicOptions::setFillContentsMode. NFCI.
Oct 2 2020, 10:53 AM
pcc closed D88747: scudo: Simplify AtomicOptions::setFillContentsMode. NFCI..
Oct 2 2020, 10:52 AM · Restricted Project
pcc added inline comments to D88523: scudo: Make it thread-safe to set some runtime configuration flags..
Oct 2 2020, 10:31 AM · Restricted Project
pcc requested review of D88747: scudo: Simplify AtomicOptions::setFillContentsMode. NFCI..
Oct 2 2020, 10:30 AM · Restricted Project

Oct 1 2020

pcc added inline comments to D77248: [llvm][IR] Add dso_local_equivalent Constant.
Oct 1 2020, 7:22 PM · Restricted Project
pcc added inline comments to D77248: [llvm][IR] Add dso_local_equivalent Constant.
Oct 1 2020, 3:46 PM · Restricted Project
pcc added inline comments to D77248: [llvm][IR] Add dso_local_equivalent Constant.
Oct 1 2020, 11:22 AM · Restricted Project

Sep 30 2020

pcc committed rG719ab7309eb7: scudo: Make it thread-safe to set some runtime configuration flags. (authored by pcc).
scudo: Make it thread-safe to set some runtime configuration flags.
Sep 30 2020, 9:43 AM
pcc added inline comments to D88523: scudo: Make it thread-safe to set some runtime configuration flags..
Sep 30 2020, 9:43 AM · Restricted Project
pcc closed D88523: scudo: Make it thread-safe to set some runtime configuration flags..
Sep 30 2020, 9:43 AM · Restricted Project

Sep 29 2020

pcc requested review of D88523: scudo: Make it thread-safe to set some runtime configuration flags..
Sep 29 2020, 5:10 PM · Restricted Project
pcc added a comment to D88457: [scudo][standalone] Fix some primary tests.

I'm not really a fan of long lists of template arguments. So I would favor something like

Sep 29 2020, 11:44 AM · Restricted Project

Sep 28 2020

pcc accepted D88457: [scudo][standalone] Fix some primary tests.

LGTM

Sep 28 2020, 5:28 PM · Restricted Project
pcc committed rGe851aeb0a508: scudo: Re-order Allocator fields for improved performance. NFCI. (authored by pcc).
scudo: Re-order Allocator fields for improved performance. NFCI.
Sep 28 2020, 11:52 AM
pcc closed D88350: scudo: Re-order Allocator fields for improved performance. NFCI..
Sep 28 2020, 11:52 AM · Restricted Project

Sep 25 2020

pcc requested review of D88350: scudo: Re-order Allocator fields for improved performance. NFCI..
Sep 25 2020, 7:10 PM · Restricted Project
pcc accepted D87717: [docs] Update ControlFlowIntegrity.rst..

LGTM

Sep 25 2020, 5:42 PM · Restricted Project
pcc accepted D87845: [LowerTypeTests][NewPM] Add constructor that uses command line flags.

LGTM

Sep 25 2020, 5:37 PM · Restricted Project

Sep 21 2020

pcc accepted D88046: [scudo][standalone] Remove the pthread key from the shared TSD.

LGTM

Sep 21 2020, 3:03 PM · Restricted Project

Sep 18 2020

pcc committed rG7bd75b630144: scudo: Add an API for disabling memory initialization per-thread. (authored by pcc).
scudo: Add an API for disabling memory initialization per-thread.
Sep 18 2020, 12:12 PM
pcc closed D87739: scudo: Add an API for disabling memory initialization per-thread..
Sep 18 2020, 12:12 PM · Restricted Project

Sep 17 2020

pcc added inline comments to D87739: scudo: Add an API for disabling memory initialization per-thread..
Sep 17 2020, 2:47 PM · Restricted Project

Sep 16 2020

pcc added inline comments to D87739: scudo: Add an API for disabling memory initialization per-thread..
Sep 16 2020, 7:26 PM · Restricted Project
pcc updated the diff for D87739: scudo: Add an API for disabling memory initialization per-thread..

Fix bug, add test, address review comment

Sep 16 2020, 7:25 PM · Restricted Project
pcc added inline comments to D87739: scudo: Add an API for disabling memory initialization per-thread..
Sep 16 2020, 5:01 PM · Restricted Project
pcc added inline comments to D87739: scudo: Add an API for disabling memory initialization per-thread..
Sep 16 2020, 11:51 AM · Restricted Project

Sep 15 2020

pcc added a comment to D87739: scudo: Add an API for disabling memory initialization per-thread..

This is the patch that I've been using to stress test my implementation:

diff --git a/compiler-rt/lib/scudo/standalone/combined.h b/compiler-rt/lib/scudo/standalone/combined.h
index 6c39b8f361e7..54ea5f487ac9 100644
--- a/compiler-rt/lib/scudo/standalone/combined.h
+++ b/compiler-rt/lib/scudo/standalone/combined.h
@@ -9,6 +9,8 @@
 #ifndef SCUDO_COMBINED_H_
 #define SCUDO_COMBINED_H_
Sep 15 2020, 9:09 PM · Restricted Project
pcc requested review of D87739: scudo: Add an API for disabling memory initialization per-thread..
Sep 15 2020, 8:59 PM · Restricted Project

Sep 10 2020

pcc committed rGd876c7c8ec53: scudo: Remove the THREADLOCAL macro. (authored by pcc).
scudo: Remove the THREADLOCAL macro.
Sep 10 2020, 7:17 PM
pcc closed D87478: scudo: Remove the THREADLOCAL macro..
Sep 10 2020, 7:16 PM · Restricted Project
pcc committed rG84c2c4977dfe: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS… (authored by pcc).
scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS…
Sep 10 2020, 7:16 PM
pcc closed D87420: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot.
Sep 10 2020, 7:16 PM · Restricted Project
pcc added a comment to D87478: scudo: Remove the THREADLOCAL macro..

This was tested with clang but I also tried g++ 9.3.0 and it compiled there. Beyond that I reckon we should just rely on bots.

Sep 10 2020, 6:56 PM · Restricted Project
pcc added inline comments to D87420: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot.
Sep 10 2020, 6:50 PM · Restricted Project
pcc updated the diff for D87420: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot.
  • Address review comments
Sep 10 2020, 6:49 PM · Restricted Project
pcc updated the diff for D87420: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot.
  • Renamed the function per feedback on the Android review
Sep 10 2020, 1:54 PM · Restricted Project
pcc added a comment to D87418: [LLD] Allow configuring default ld.lld backend.

How widespread are these build systems that parse help output? (Given that it took until now to discover them, I'd venture "not very".) Maybe it would be better to fix them to explicitly pass -m and/or do something that doesn't rely on parsing help output (e.g. just try the flag and see whether it fails).

Sep 10 2020, 1:35 PM · Restricted Project, lld
pcc requested review of D87478: scudo: Remove the THREADLOCAL macro..
Sep 10 2020, 12:39 PM · Restricted Project
pcc added inline comments to D87420: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot.
Sep 10 2020, 12:32 PM · Restricted Project
pcc updated the diff for D87420: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot.
  • Address review comments
Sep 10 2020, 12:31 PM · Restricted Project
pcc added a comment to D87420: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot.

Where is the implementation of getPlatformTlsSlot?

Sep 10 2020, 12:25 PM · Restricted Project

Sep 9 2020

pcc requested review of D87420: scudo: Introduce a new mechanism to let Scudo access a platform-specific TLS slot.
Sep 9 2020, 3:33 PM · Restricted Project

Sep 3 2020

pcc added a comment to D87095: [Triple][MachO] Define "arm64e", an AArch64 subarch for Pointer Auth..

Hi, thanks for getting started on upstreaming this!

Sep 3 2020, 11:00 AM · Restricted Project, Restricted Project

Aug 25 2020

pcc accepted D75655: [Docs] Document -lto-whole-program-visibility.

Thanks and sorry for the delay.

Aug 25 2020, 6:03 PM · Restricted Project
pcc added a comment to D75655: [Docs] Document -lto-whole-program-visibility.

I think that the part of the description beginning "This can be used when..." is somewhat misleading since you could pretty much say the same thing about specifying -fvisibility=hidden -fwhole-program-vtables at compile time.

Aug 25 2020, 4:20 PM · Restricted Project

Aug 24 2020

pcc added a comment to D84414: [RISCV] Support Shadow Call Stack.

FWIW, on aarch64 we decided to make -fsanitize=shadow-call-stack require the x18 reservation (instead of implying it) to try to avoid ABI mismatch problems. That is, it should be safe to mix and match code compiled with and without -fsanitize=shadow-call-stack. If we make -fsanitize=shadow-call-stack imply the x18 reservation, it makes it more likely that someone will accidentally build and link in incompatible code that does not reserve x18.

Aug 24 2020, 11:36 AM · Restricted Project, Restricted Project

Aug 19 2020

pcc committed rGa208ad5ddb5b: sanitizer_common: Use void* for madvise first argument on Solaris. (authored by pcc).
sanitizer_common: Use void* for madvise first argument on Solaris.
Aug 19 2020, 10:56 AM
pcc closed D86166: sanitizer_common: Use void* for madvise first argument on Solaris..
Aug 19 2020, 10:56 AM · Restricted Project

Aug 18 2020

pcc added a comment to D86166: sanitizer_common: Use void* for madvise first argument on Solaris..
In D86166#2224751, @ro wrote:
In D86166#2224690, @pcc wrote:

@ro On D85870 you mentioned that the declaration has been changed in Solaris 11.4 to use void * which causes a build break on 11.4 due to the incompatible declaration. I checked illumos and it looks like their declaration still has caddr_t, although the comment above this declaration implies that that shouldn't matter because the system's declaration isn't visible. But what about older versions of Solaris? Presumably they still have a declaration with caddr_t so I imagine the build would break with an incompatible declaration error there. Or do we not care about older versions?

As was discussed in D84046, Solaris doesn't need an explicit declaration at all: with __EXTENSIONS__ defined, a declaration of madvise will be visible without doing anything special.

However, on Illumos with _XOPEN_SOURCE defined (as g++ does on Solaris), there is no way to make an madvise declaration visible. So on Illumos, it doesn't matter if it uses void * or caddr_t since there can be no conflict with a system declaration. However the declaration currently needs to agree with the Solaris one to avoid the build breakage.

Part of the trouble is that we currently cannot distinguish between Solaris and Illumos at all at compile time; I have a patch to define __illumos__ based on uname -o for cases where it's difficult otherwise. All a royal mess, but done for the benefit of Illumos, not for not caring about it.

With respect to other older versions of Solaris, the only one even remotely interesting (and the oldest one I still test in GCC) is 11.3. I have a bunch of patches to at least allow LLVM to compile, but there are so many issues (ld not wrapping sections in __start_<sec>/__stop_<sec> symbols, lack of __cxa_atexit, lack of fmemopen, lack of constructor priority support, and that's just the tip of the iceberg) that I strongly doubt there's any value in trying to pursue this further. In fact the 11.3 madvise declaration still using caddr_t prompted me to do the __illumos__ patch so an Illumos-only declaration wouldn't interfere with Solaris.

Aug 18 2020, 2:05 PM · Restricted Project
pcc updated the diff for D86166: sanitizer_common: Use void* for madvise first argument on Solaris..

Add explanation to comment

Aug 18 2020, 2:05 PM · Restricted Project
pcc added a comment to D86166: sanitizer_common: Use void* for madvise first argument on Solaris..

@ro On D85870 you mentioned that the declaration has been changed in Solaris 11.4 to use void * which causes a build break on 11.4 due to the incompatible declaration. I checked illumos and it looks like their declaration still has caddr_t, although the comment above this declaration implies that that shouldn't matter because the system's declaration isn't visible. But what about older versions of Solaris? Presumably they still have a declaration with caddr_t so I imagine the build would break with an incompatible declaration error there. Or do we not care about older versions?

Aug 18 2020, 1:15 PM · Restricted Project
pcc added inline comments to D85870: sanitizer_common: Introduce internal_madvise and start using it..
Aug 18 2020, 1:11 PM · Restricted Project