Page MenuHomePhabricator

pcc (Peter Collingbourne)
User

Projects

User does not belong to any projects.

User Details

User Since
Dec 28 2012, 2:34 PM (420 w, 2 d)

Recent Activity

Fri, Jan 15

pcc added a comment to D92892: [clang] Change builtin object size to be compatible with GCC when sub-object is invalid.

This causes us to reject the following (reduced from AOSP):

int sprintf(char* __s, const char* __fmt, ...)
    __attribute__((__format__(printf, 2, 3))) ;
int sprintf(char* dest, const char* format)
    __attribute__((overloadable))
    __attribute__((enable_if(((__builtin_object_size(((dest)), (1))) != ((unsigned long) -1) && (__builtin_object_size(((dest)), (1))) < (__builtin_strlen(format))), "format string will always overflow destination buffer")))
Fri, Jan 15, 6:07 PM · Restricted Project
pcc committed rGd302398ff05f: hwasan: Update register-dump-read.c test to reserve x23 instead of x20. (authored by pcc).
hwasan: Update register-dump-read.c test to reserve x23 instead of x20.
Fri, Jan 15, 4:15 PM

Tue, Jan 12

pcc updated the diff for D94212: scudo: Add support for tracking stack traces of secondary allocations..
  • Instead of updating an existing ring buffer entry, create a new entry
Tue, Jan 12, 9:59 PM · Restricted Project, Restricted Project
pcc updated the diff for D93731: scudo: Support memory tagging in the secondary allocator..
  • Disable memory tagging in the test allocator if disabled via prctl()
Tue, Jan 12, 6:23 PM · Restricted Project

Fri, Jan 8

pcc added a comment to D94212: scudo: Add support for tracking stack traces of secondary allocations..

Can we have a setting where the secondary ring buffer is used for primary allocations, too? The primary record could be pushed when the chunk is about to be reused.

Fri, Jan 8, 5:51 PM · Restricted Project, Restricted Project
pcc added inline comments to D93731: scudo: Support memory tagging in the secondary allocator..
Fri, Jan 8, 11:15 AM · Restricted Project

Thu, Jan 7

pcc updated the diff for D93731: scudo: Support memory tagging in the secondary allocator..

Fixes for Fuchsia

Thu, Jan 7, 9:43 PM · Restricted Project

Wed, Jan 6

pcc requested review of D94212: scudo: Add support for tracking stack traces of secondary allocations..
Wed, Jan 6, 8:37 PM · Restricted Project, Restricted Project
pcc added a comment to D93731: scudo: Support memory tagging in the secondary allocator..

It's ready to go in if you don't mind me breaking Fuchsia. Otherwise I can wait for a Fuchsia implementation of setMemoryPermission() from you.

Wed, Jan 6, 1:07 PM · Restricted Project

Tue, Jan 5

pcc committed rG6dc3c117a307: scudo: Update a comment to match the Linux kernel behavior. NFCI. (authored by pcc).
scudo: Update a comment to match the Linux kernel behavior. NFCI.
Tue, Jan 5, 7:53 PM
pcc committed rGaed84542d5a0: ELF: Teach the linker about the 'B' augmentation string character. (authored by pcc).
ELF: Teach the linker about the 'B' augmentation string character.
Tue, Jan 5, 7:51 PM
pcc closed D93954: ELF: Teach the linker about the 'B' augmentation string character..
Tue, Jan 5, 7:51 PM · Restricted Project
pcc updated the diff for D93954: ELF: Teach the linker about the 'B' augmentation string character..
  • Rename test
Tue, Jan 5, 5:25 PM · Restricted Project

Wed, Dec 30

pcc requested review of D93954: ELF: Teach the linker about the 'B' augmentation string character..
Wed, Dec 30, 11:10 PM · Restricted Project
pcc added a comment to D91726: [LoopIdiom] 'left-shift until bittest' idiom: support canonical sign bit mask.

Sure, here is the .ll file.


Reproduces with opt -O2 -S test2.ll.

Wed, Dec 30, 12:00 PM · Restricted Project

Tue, Dec 29

pcc added inline comments to D93495: CrashReason: Add MTE tag check faults to the list of crash reasons..
Tue, Dec 29, 2:44 PM · Restricted Project
pcc committed rG7e5a187de313: CrashReason: Add MTE tag check faults to the list of crash reasons. (authored by pcc).
CrashReason: Add MTE tag check faults to the list of crash reasons.
Tue, Dec 29, 2:37 PM
pcc closed D93495: CrashReason: Add MTE tag check faults to the list of crash reasons..
Tue, Dec 29, 2:37 PM · Restricted Project
pcc added a comment to D91726: [LoopIdiom] 'left-shift until bittest' idiom: support canonical sign bit mask.

It looks like this patch caused an assertion failure:

$ cat test.ii
# 1 "" 3
typedef int a;
typedef unsigned b;
struct c {
  template <typename d> c(d e) : f(e) {}
  int f;
};
struct g {
  template <typename h, typename ad> g(h e, ad) : ae(e), af(0) {}
  c ae;
  c af;
};
template <typename ag, typename i> auto ah(ag e, i) { return g(e, 0); }
class j {
public:
  void k();
};
class l;
class m {
public:
  m(int, l, int);
};
class l {
public:
  l(int, int);
};
class n {
  bool o();
  int ax;
};
template <typename> using ay = m;
template <typename, typename> using bc = l;
class p {
public:
  int *m_fn3();
  a q();
};
class r {
public:
  r(int)
      : bh(0, bc<int, int>(int(), bi), bi), bj(int(), bi), bk(int(), bi),
        bl(int(), bi) {
    p bn;
    int *base = bn.m_fn3();
    a bo = base == nullptr ?: bn.q();
    if (bo)
      for (auto bp = ah(bo, 0); __builtin_expect(bp.ae.f >= bp.af.f, false);)
        j().k();
  }
  int bi;
  ay<bc<int, int>> bh;
  bc<int, int> bj;
  bc<b, bool> bk;
  bc<b, int> bl;
};
bool n::o() { r bq(ax); }
$ ~/l2/ra/bin/clang -O2 test.ii
clang: ../llvm/include/llvm/IR/Instructions.h:2767: llvm::Value *llvm::PHINode::getIncomingValueForBlock(const llvm::BasicBlock *) const: Assertion `Idx >= 0 && "Invalid basic block argument!"' failed.
Tue, Dec 29, 2:23 PM · Restricted Project

Wed, Dec 23

pcc updated the diff for D93731: scudo: Support memory tagging in the secondary allocator..
  • Set MAP_MEMTAG only if tagging enabled
Wed, Dec 23, 12:11 PM · Restricted Project

Tue, Dec 22

pcc committed rGfaac1c02c802: scudo: Move the management of the UseMemoryTagging bit out of the Primary. NFCI. (authored by pcc).
scudo: Move the management of the UseMemoryTagging bit out of the Primary. NFCI.
Tue, Dec 22, 4:53 PM
pcc committed rGe6b3db6309f2: scudo: Replace the Cache argument on MapAllocator with a Config argument. NFCI. (authored by pcc).
scudo: Replace the Cache argument on MapAllocator with a Config argument. NFCI.
Tue, Dec 22, 4:53 PM
pcc closed D93730: scudo: Move the management of the UseMemoryTagging bit out of the Primary. NFCI..
Tue, Dec 22, 4:53 PM · Restricted Project
pcc closed D93729: scudo: Replace the Cache argument on MapAllocator with a Config argument. NFCI..
Tue, Dec 22, 4:53 PM · Restricted Project
pcc added inline comments to D93731: scudo: Support memory tagging in the secondary allocator..
Tue, Dec 22, 4:34 PM · Restricted Project
pcc committed rG6dfe5801e01d: scudo: Move the configuration for the primary allocator to Config. NFCI. (authored by pcc).
scudo: Move the configuration for the primary allocator to Config. NFCI.
Tue, Dec 22, 2:55 PM
pcc closed D93728: scudo: Move the configuration for the primary allocator to Config. NFCI..
Tue, Dec 22, 2:55 PM · Restricted Project
pcc requested review of D93731: scudo: Support memory tagging in the secondary allocator..
Tue, Dec 22, 1:49 PM · Restricted Project
pcc requested review of D93730: scudo: Move the management of the UseMemoryTagging bit out of the Primary. NFCI..
Tue, Dec 22, 1:49 PM · Restricted Project
pcc requested review of D93729: scudo: Replace the Cache argument on MapAllocator with a Config argument. NFCI..
Tue, Dec 22, 1:48 PM · Restricted Project
pcc requested review of D93728: scudo: Move the configuration for the primary allocator to Config. NFCI..
Tue, Dec 22, 1:47 PM · Restricted Project

Mon, Dec 21

pcc added inline comments to D63908: hwasan: Improve precision of checks using short granule tags..
Mon, Dec 21, 11:53 PM · Restricted Project, Restricted Project, Restricted Project
pcc added a comment to D93495: CrashReason: Add MTE tag check faults to the list of crash reasons..

I assume that the signal displays without tag bits just like any other SEGV?

I was thinking about testing but I don't see any tests for specific signals so it would only be needed if your change to add the tag bits to siginfo has gone in.
(I have been following it from a distance but not sure of the status)

Mon, Dec 21, 1:38 PM · Restricted Project
pcc updated the diff for D93495: CrashReason: Add MTE tag check faults to the list of crash reasons..

Show fault address for SEGV_MTESERR

Mon, Dec 21, 1:38 PM · Restricted Project
pcc committed rGdfa40840e0e2: scudo: Remove ANDROID_EXPERIMENTAL_MTE macro. (authored by pcc).
scudo: Remove ANDROID_EXPERIMENTAL_MTE macro.
Mon, Dec 21, 10:54 AM
pcc closed D93513: scudo: Remove ANDROID_EXPERIMENTAL_MTE macro..
Mon, Dec 21, 10:53 AM · Restricted Project

Dec 17 2020

pcc requested review of D93513: scudo: Remove ANDROID_EXPERIMENTAL_MTE macro..
Dec 17 2020, 9:41 PM · Restricted Project
pcc requested review of D93495: CrashReason: Add MTE tag check faults to the list of crash reasons..
Dec 17 2020, 3:39 PM · Restricted Project
pcc updated the diff for D93438: ObjectFileELF: Test whether reloc_header is non-null instead of asserting..

Add test

Dec 17 2020, 1:44 PM · Restricted Project
pcc committed rGe22d802e587b: scudo: Adjust test to use correct check for primary allocations. (authored by pcc).
scudo: Adjust test to use correct check for primary allocations.
Dec 17 2020, 10:42 AM
pcc closed D93437: scudo: Adjust test to use correct check for primary allocations..
Dec 17 2020, 10:42 AM · Restricted Project

Dec 16 2020

pcc updated the diff for D93437: scudo: Adjust test to use correct check for primary allocations..

Fix MTE issue

Dec 16 2020, 8:25 PM · Restricted Project
pcc added a comment to D90782: [LTO] set data layout for module before optimize&codegen.

I don't think we should do this unless it fixes a bug. What happens if you remove it from the other two places?

Dec 16 2020, 6:36 PM · Restricted Project
pcc requested review of D93438: ObjectFileELF: Test whether reloc_header is non-null instead of asserting..
Dec 16 2020, 6:10 PM · Restricted Project
pcc requested review of D93437: scudo: Adjust test to use correct check for primary allocations..
Dec 16 2020, 5:48 PM · Restricted Project

Dec 15 2020

pcc added inline comments to D93362: [llvm-elfabi] Support ELF file that lacks .gnu.hash section.
Dec 15 2020, 8:57 PM · Restricted Project

Dec 14 2020

pcc committed rGf21f3339ba31: scudo: Remove positional template arguments for secondary cache. NFCI. (authored by pcc).
scudo: Remove positional template arguments for secondary cache. NFCI.
Dec 14 2020, 3:41 PM
pcc closed D93251: scudo: Remove positional template arguments for secondary cache. NFCI..
Dec 14 2020, 3:40 PM · Restricted Project
pcc requested review of D93251: scudo: Remove positional template arguments for secondary cache. NFCI..
Dec 14 2020, 2:58 PM · Restricted Project

Dec 9 2020

pcc accepted D92689: [scudo][standalone] Small changes to the fastpath.

LGTM

Dec 9 2020, 2:27 PM · Restricted Project
pcc committed rGa7790508522f: scudo: Shrink secondary header and cache entry size by a word on Linux. NFCI. (authored by pcc).
scudo: Shrink secondary header and cache entry size by a word on Linux. NFCI.
Dec 9 2020, 2:15 PM
pcc closed D92966: scudo: Shrink secondary header and cache entry size by a word on Linux. NFCI..
Dec 9 2020, 2:15 PM · Restricted Project
pcc requested review of D92966: scudo: Shrink secondary header and cache entry size by a word on Linux. NFCI..
Dec 9 2020, 1:33 PM · Restricted Project
pcc committed rGe5a28e1261a0: scudo: Fix quarantine allocation when MTE enabled. (authored by pcc).
scudo: Fix quarantine allocation when MTE enabled.
Dec 9 2020, 11:49 AM
pcc committed rG9f8aeb060293: scudo: Split setRandomTag in two. NFCI. (authored by pcc).
scudo: Split setRandomTag in two. NFCI.
Dec 9 2020, 11:49 AM
pcc closed D92881: scudo: Fix quarantine allocation when MTE enabled..
Dec 9 2020, 11:49 AM · Restricted Project
pcc closed D92880: scudo: Split setRandomTag in two. NFCI..
Dec 9 2020, 11:49 AM · Restricted Project
pcc added inline comments to D92880: scudo: Split setRandomTag in two. NFCI..
Dec 9 2020, 11:15 AM · Restricted Project
pcc added inline comments to D92881: scudo: Fix quarantine allocation when MTE enabled..
Dec 9 2020, 11:15 AM · Restricted Project

Dec 8 2020

pcc requested review of D92881: scudo: Fix quarantine allocation when MTE enabled..
Dec 8 2020, 12:52 PM · Restricted Project
pcc requested review of D92880: scudo: Split setRandomTag in two. NFCI..
Dec 8 2020, 12:51 PM · Restricted Project

Dec 4 2020

pcc added inline comments to D92689: [scudo][standalone] Small changes to the fastpath.
Dec 4 2020, 2:15 PM · Restricted Project

Dec 3 2020

pcc requested review of D92619: AArch64: Add initial apple-m1 target..
Dec 3 2020, 4:42 PM · Restricted Project

Dec 1 2020

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

I think @cferris was asking whether old scudo was still being used by asan/hwasan. To which the answer is "no" I believe, the sanitizers have their own independent copy of the allocator.

Dec 1 2020, 2:54 PM · Restricted Project

Nov 23 2020

pcc accepted D91999: [hwasan] Fix tests when vm.overcommit_memory=1..

LGTM

Nov 23 2020, 4:18 PM · Restricted Project

Nov 20 2020

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.

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

LGTM

Nov 20 2020, 4:21 PM · Restricted Project

Nov 19 2020

pcc added a comment to D91583: [LTO] Prevent devirtualization for symbols exported to dynamic linker.
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?

Nov 19 2020, 10:08 AM · Restricted Project

Nov 18 2020

pcc added a comment to D91583: [LTO] Prevent devirtualization for symbols exported to dynamic linker.

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.

Nov 18 2020, 7:45 PM · Restricted Project

Nov 16 2020

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

What is the use case?

Nov 16 2020, 11:19 AM · Restricted Project

Nov 13 2020

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?

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

Nov 10 2020

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

LGTM

Nov 10 2020, 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.
Nov 10 2020, 4:06 PM
pcc closed D91219: hwasan: Bring back operator {new,delete} interceptors on Android..
Nov 10 2020, 4:05 PM · Restricted Project
pcc requested review of D91219: hwasan: Bring back operator {new,delete} interceptors on Android..
Nov 10 2020, 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.
Nov 10 2020, 3:51 PM

Nov 5 2020

pcc accepted D90700: [scudo][standalone] Simplify populateFreelist.
Nov 5 2020, 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.

Nov 5 2020, 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.
Nov 5 2020, 9:25 AM
pcc closed D90814: scudo: Don't memset previously released cached pages in the secondary allocator..
Nov 5 2020, 9:25 AM · Restricted Project

Nov 4 2020

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

Nov 3 2020

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.

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

Oct 30 2020

pcc committed rG3d049bce98ce: hwasan: Support for outlined checks in the Linux kernel. (authored by pcc).
hwasan: Support for outlined checks in the Linux kernel.
Oct 30 2020, 2:26 PM
pcc closed D90426: hwasan: Support for outlined checks in the Linux kernel..
Oct 30 2020, 2:26 PM · Restricted Project
pcc added inline comments to D90070: [TTI] Add optional VecPred argument to getCmpSelInstrCost..
Oct 30 2020, 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.
Oct 30 2020, 1:24 PM
pcc closed D90425: hwasan: Move fixed shadow behind opaque no-op cast as well..
Oct 30 2020, 1:24 PM · Restricted Project
pcc added inline comments to D90425: hwasan: Move fixed shadow behind opaque no-op cast as well..
Oct 30 2020, 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…
Oct 30 2020, 12:54 PM
pcc closed D90424: AArch64: Use SBFX instead of UBFX to extract address granule in outlined HWASan checks..
Oct 30 2020, 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.
Oct 30 2020, 12:52 PM
pcc closed D90422: AArch64: Switch to x20 as the shadow base register for outlined HWASan checks..
Oct 30 2020, 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.

Oct 30 2020, 8:16 AM

Oct 29 2020

pcc added inline comments to D90426: hwasan: Support for outlined checks in the Linux kernel..
Oct 29 2020, 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

Oct 29 2020, 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.

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