Page MenuHomePhabricator

pcc (Peter Collingbourne)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Fri, May 17

pcc added a comment to D56672: [HWASAN] Instrument globals.

Could this use a relative relocation so that we aren't paying the cost of a dynamic relocation for each global?

@pcc Sorry I missed your comment

I think this is not possible to do for shared objects, because GVs could be preempted.

I think it should be possible if you make the relocation point to the object itself (which will have local linkage) and not the alias that you're creating. Of course you'll need to add the tag to the address in the same way as when you create the alias.

Still this looks possible for executables where I can set
visibility of instrumented globals to hidden. I'll try this out

Fri, May 17, 6:50 PM

Thu, May 16

pcc added a comment to D60242: Add IR support, ELF section and user documentation for partitioning feature..

Ping^2.

Thu, May 16, 7:06 PM · Restricted Project
pcc accepted D61968: HWASan exception support..

LGTM

Thu, May 16, 4:35 PM · Restricted Project, Restricted Project
pcc added inline comments to D62014: [X86] Support .reloc *, R_{386,X86_64}_NONE, *.
Thu, May 16, 12:56 PM · Restricted Project

Wed, May 15

pcc added a comment to D61965: [zorg] Add empty GN buildbot.

I think this would need to be clearly labeled as an experimental builder so that it's clear that developers aren't on the hook for fixing it. It also means that the bot will need to be configured not to send mail to the blamelist.

Wed, May 15, 3:29 PM · Restricted Project

Mon, May 13

pcc updated the diff for D60353: ELF: Add basic partition data structures and behaviours..
  • Use a one-liner to initialize Partitions
Mon, May 13, 1:42 PM · Restricted Project
pcc added inline comments to D60353: ELF: Add basic partition data structures and behaviours..
Mon, May 13, 1:42 PM · Restricted Project

Fri, May 10

pcc accepted D59709: [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible.

Sorry for the long delay in reviewing this.

Fri, May 10, 10:35 AM · Restricted Project
pcc added a comment to D59709: [ThinLTO] Auto-hide prevailing linkonce_odr only when all copies eligible.

I think there might still be a problem where we're dropping the distinction between visible to other translation units and visible outside the linkage unit. This is related to the distinction between LDPR_PREVAILING_DEF_IRONLY and LDPR_PREVAILING_DEF_IRONLY_EXP in the gold plugin interface. Let me look into it a bit more and get back to you.

Fri, May 10, 9:56 AM · Restricted Project

Wed, May 8

pcc added inline comments to D56672: [HWASAN] Instrument globals.
Wed, May 8, 1:32 PM

Tue, May 7

pcc updated the diff for D60353: ELF: Add basic partition data structures and behaviours..
  • Switch to using llvm-readelf
Tue, May 7, 9:30 AM · Restricted Project

Mon, May 6

pcc added inline comments to D60353: ELF: Add basic partition data structures and behaviours..
Mon, May 6, 3:36 PM · Restricted Project
pcc updated the diff for D60353: ELF: Add basic partition data structures and behaviours..
  • Rebase
  • Address review comments
Mon, May 6, 3:36 PM · Restricted Project
pcc updated the diff for D60242: Add IR support, ELF section and user documentation for partitioning feature..
  • Add a note about the limit on the number of partitions
Mon, May 6, 1:52 PM · Restricted Project
pcc added a comment to D60242: Add IR support, ELF section and user documentation for partitioning feature..

Ping.

Mon, May 6, 1:12 PM · Restricted Project
pcc committed rG2d2277f5e7ce: gn build: Merge r360063. (authored by pcc).
gn build: Merge r360063.
Mon, May 6, 1:08 PM
pcc committed rL360074: gn build: Merge r360063..
gn build: Merge r360063.
Mon, May 6, 1:07 PM

Wed, May 1

pcc added inline comments to D58321: Support for relative vtables.
Wed, May 1, 11:19 AM · Restricted Project, Restricted Project

Fri, Apr 26

pcc added inline comments to D54815: [ThinLTO] Add summary entries for index-based WPD.
Fri, Apr 26, 5:58 PM · Restricted Project
pcc added a comment to D55153: [ThinLTO] Implement index-based WPD.

Could you please revert the changes from D54815 out of this change so that it is easier to read?

Fri, Apr 26, 5:58 PM · Restricted Project

Apr 18 2019

pcc created D60894: openmp: Align kmp_int64 and kmp_uint64 to 64 bits..
Apr 18 2019, 3:54 PM · Restricted Project

Apr 17 2019

pcc added inline comments to D60353: ELF: Add basic partition data structures and behaviours..
Apr 17 2019, 7:51 PM · Restricted Project
pcc updated the diff for D60353: ELF: Add basic partition data structures and behaviours..
  • Adjust error message format
Apr 17 2019, 7:51 PM · Restricted Project

Apr 16 2019

pcc committed rG990514cec829: clangd: Change Windows.h to windows.h. (authored by pcc).
clangd: Change Windows.h to windows.h.
Apr 16 2019, 8:03 PM
pcc committed rL358549: clangd: Change Windows.h to windows.h..
clangd: Change Windows.h to windows.h.
Apr 16 2019, 8:02 PM
pcc committed rCTE358549: clangd: Change Windows.h to windows.h..
clangd: Change Windows.h to windows.h.
Apr 16 2019, 8:02 PM
pcc added a comment to D60807: Test for Oz fail.

Interesting, it looks like the difference here is almost entirely due to different inlining decisions.

Apr 16 2019, 6:01 PM · Restricted Project
pcc added inline comments to D60806: [HWASan] Added no-FP unit test for register dump..
Apr 16 2019, 5:14 PM · Restricted Project, Restricted Project
pcc added inline comments to D60353: ELF: Add basic partition data structures and behaviours..
Apr 16 2019, 4:43 PM · Restricted Project
pcc updated the diff for D60353: ELF: Add basic partition data structures and behaviours..
  • Use std::vector
Apr 16 2019, 4:41 PM · Restricted Project
pcc added reviewers for D60242: Add IR support, ELF section and user documentation for partitioning feature.: echristo, jyknight.

Adding some more people who may be able to review the LLVM changes here.

Apr 16 2019, 3:47 PM · Restricted Project
pcc committed rLLD358536: ELF: Move build id computation to Writer. NFCI..
ELF: Move build id computation to Writer. NFCI.
Apr 16 2019, 3:46 PM
pcc committed rG97d25e068f43: ELF: Move build id computation to Writer. NFCI. (authored by pcc).
ELF: Move build id computation to Writer. NFCI.
Apr 16 2019, 3:46 PM
pcc committed rL358536: ELF: Move build id computation to Writer. NFCI..
ELF: Move build id computation to Writer. NFCI.
Apr 16 2019, 3:43 PM
pcc closed D60342: ELF: Move build id computation to Writer. NFCI..
Apr 16 2019, 3:43 PM · Restricted Project

Apr 15 2019

pcc added a comment to D60722: gn build: Add a `use_asan` build arg that can be used to build asanified clangs and llds.

We shouldn't be compiling any of the sanitizer runtimes with sanitizers, that's pretty much guaranteed not to work.

Apr 15 2019, 10:20 AM · Restricted Project

Apr 12 2019

pcc added inline comments to D60593: [GwpAsan] Introduce GWP-ASan..
Apr 12 2019, 2:21 PM · Restricted Project, Restricted Project, Restricted Project

Apr 11 2019

pcc added a comment to D60548: Variable auto-init: also auto-init alloca.

I probably wouldn't do anything about suppressing init on alloca for now, but if we did do something I think I'd be in favour of the separate builtin for uninitialized alloca. I also considered the alternative of allowing __attribute__((uninitialized)) to appear on a function or block statement, but it seemed clearer for the uninitialized-ness to be as close to the alloca as possible.

Apr 11 2019, 10:27 AM · Restricted Project

Apr 8 2019

pcc committed rGdf57979ba7b7: hwasan: Enable -hwasan-allow-ifunc by default. (authored by pcc).
hwasan: Enable -hwasan-allow-ifunc by default.
Apr 8 2019, 5:25 PM
pcc committed rCRT357960: hwasan: Enable -hwasan-allow-ifunc by default..
hwasan: Enable -hwasan-allow-ifunc by default.
Apr 8 2019, 5:25 PM
pcc committed rL357960: hwasan: Enable -hwasan-allow-ifunc by default..
hwasan: Enable -hwasan-allow-ifunc by default.
Apr 8 2019, 5:25 PM
pcc closed D60355: hwasan: Enable -hwasan-allow-ifunc by default..
Apr 8 2019, 5:25 PM · Restricted Project, Restricted Project
pcc committed rGd3e207057fc4: ELF: Move verneed tracking data structures out of VersionNeedSection. (authored by pcc).
ELF: Move verneed tracking data structures out of VersionNeedSection.
Apr 8 2019, 10:47 AM
pcc committed rLLD357926: ELF: Move verneed tracking data structures out of VersionNeedSection..
ELF: Move verneed tracking data structures out of VersionNeedSection.
Apr 8 2019, 10:47 AM
pcc committed rL357926: ELF: Move verneed tracking data structures out of VersionNeedSection..
ELF: Move verneed tracking data structures out of VersionNeedSection.
Apr 8 2019, 10:47 AM
pcc closed D60307: ELF: Move verneed tracking data structures out of VersionNeedSection..
Apr 8 2019, 10:47 AM · Restricted Project
pcc committed rGcc1618e6689d: ELF: De-template SharedFile. NFCI. (authored by pcc).
ELF: De-template SharedFile. NFCI.
Apr 8 2019, 10:36 AM
pcc committed rLLD357925: ELF: De-template SharedFile. NFCI..
ELF: De-template SharedFile. NFCI.
Apr 8 2019, 10:35 AM
pcc committed rL357925: ELF: De-template SharedFile. NFCI..
ELF: De-template SharedFile. NFCI.
Apr 8 2019, 10:35 AM
pcc closed D60305: ELF: De-template SharedFile. NFCI..
Apr 8 2019, 10:35 AM · Restricted Project

Apr 5 2019

pcc created D60355: hwasan: Enable -hwasan-allow-ifunc by default..
Apr 5 2019, 7:52 PM · Restricted Project, Restricted Project
pcc accepted D60332: [gn] Support for per-target runtime directory layout.

LGTM as well

Apr 5 2019, 7:43 PM · Restricted Project, Restricted Project
pcc created D60353: ELF: Add basic partition data structures and behaviours..
Apr 5 2019, 7:09 PM · Restricted Project
pcc added a child revision for D60242: Add IR support, ELF section and user documentation for partitioning feature.: D60353: ELF: Add basic partition data structures and behaviours..
Apr 5 2019, 7:09 PM · Restricted Project
pcc updated the diff for D60242: Add IR support, ELF section and user documentation for partitioning feature..
  • Add missing pieces to MC; add test
Apr 5 2019, 6:21 PM · Restricted Project
pcc committed rGc0da957bb05b: tsan: Update test expectations. (authored by pcc).
tsan: Update test expectations.
Apr 5 2019, 5:44 PM
pcc committed rCRT357831: tsan: Update test expectations..
tsan: Update test expectations.
Apr 5 2019, 5:44 PM
pcc committed rL357831: tsan: Update test expectations..
tsan: Update test expectations.
Apr 5 2019, 5:44 PM
pcc created D60342: ELF: Move build id computation to Writer. NFCI..
Apr 5 2019, 3:25 PM · Restricted Project
pcc added inline comments to D60305: ELF: De-template SharedFile. NFCI..
Apr 5 2019, 1:52 PM · Restricted Project
pcc updated the diff for D60305: ELF: De-template SharedFile. NFCI..
  • Split out code into functions
Apr 5 2019, 1:52 PM · Restricted Project
pcc committed rG883ab235eea7: ELF: De-template ELFFileBase. NFCI. (authored by pcc).
ELF: De-template ELFFileBase. NFCI.
Apr 5 2019, 1:15 PM
pcc committed rLLD357806: ELF: De-template ELFFileBase. NFCI..
ELF: De-template ELFFileBase. NFCI.
Apr 5 2019, 1:15 PM
pcc committed rL357806: ELF: De-template ELFFileBase. NFCI..
ELF: De-template ELFFileBase. NFCI.
Apr 5 2019, 1:14 PM
pcc closed D60304: ELF: De-template ELFFileBase. NFCI..
Apr 5 2019, 1:14 PM · Restricted Project
pcc updated the diff for D60307: ELF: Move verneed tracking data structures out of VersionNeedSection..
  • Add comment
Apr 5 2019, 12:53 PM · Restricted Project
pcc added inline comments to D60253: [gn] Support for building runtimes.
Apr 5 2019, 12:10 PM · Restricted Project
pcc added a comment to D60242: Add IR support, ELF section and user documentation for partitioning feature..

Hi Peter,

I really like the concept. I had some nebulous concerns when I read the RFC; but, I didn't comment as I couldn't think of any alternatives to what you were proposing. What I am writing here is still not fully formed.. so feel free to ignore if it is unhelpful.

My main concern is that this is supporting a rare usecase and I don't really like the idea of adding complexity to the core tools for niche cases.

I feel like it would be better if this could be implemented via post-processing in some way; outside of the core tools.

Some aspect of this, like the linker being able to report all of the functions reachable from a given set of entry points, are of general utility though.

I wonder if there is any scope for implementing something different along the lines of:

  1. Do an initial link.
  2. Analyse the resulting elf and report all of the functions in each partition.
  3. Do another link but this time provide an ordering file so that all of the functions for each partition are placed contiguously.
  4. Extract the functions for each partition, apart form the first, into a partition file which also contains metadata specifying the address range.
  5. Write zeros over all of the functions apart from those in the main partition and then compress the executable (saving the file space).
  6. A loader extension patches in the missing functions for each partition when needed.
Apr 5 2019, 11:19 AM · Restricted Project

Apr 4 2019

pcc added a child revision for D60305: ELF: De-template SharedFile. NFCI.: D60307: ELF: Move verneed tracking data structures out of VersionNeedSection..
Apr 4 2019, 10:53 PM · Restricted Project
pcc created D60307: ELF: Move verneed tracking data structures out of VersionNeedSection..
Apr 4 2019, 10:53 PM · Restricted Project
pcc created D60305: ELF: De-template SharedFile. NFCI..
Apr 4 2019, 9:40 PM · Restricted Project
pcc created D60304: ELF: De-template ELFFileBase. NFCI..
Apr 4 2019, 9:40 PM · Restricted Project
pcc added a child revision for D60304: ELF: De-template ELFFileBase. NFCI.: D60305: ELF: De-template SharedFile. NFCI..
Apr 4 2019, 9:40 PM · Restricted Project
pcc added inline comments to D60274: [ELF] Implement Dependent Libraries Feature.
Apr 4 2019, 8:29 PM · Restricted Project
pcc committed rGad4376e8afdb: ELF: Simplify. NFCI. (authored by pcc).
ELF: Simplify. NFCI.
Apr 4 2019, 6:31 PM
pcc committed rLLD357739: ELF: Simplify. NFCI..
ELF: Simplify. NFCI.
Apr 4 2019, 6:31 PM
pcc committed rL357739: ELF: Simplify. NFCI..
ELF: Simplify. NFCI.
Apr 4 2019, 6:31 PM
pcc closed D60299: ELF: Simplify. NFCI..
Apr 4 2019, 6:31 PM · Restricted Project
pcc created D60299: ELF: Simplify. NFCI..
Apr 4 2019, 6:16 PM · Restricted Project
pcc added inline comments to D60274: [ELF] Implement Dependent Libraries Feature.
Apr 4 2019, 4:11 PM · Restricted Project
pcc added inline comments to D60242: Add IR support, ELF section and user documentation for partitioning feature..
Apr 4 2019, 3:39 PM · Restricted Project
pcc updated the diff for D60242: Add IR support, ELF section and user documentation for partitioning feature..
  • Address review comments
Apr 4 2019, 3:39 PM · Restricted Project
pcc added a comment to D60226: [ThinLTO] Fix ThinLTOCodegenerator to export llvm.used symbols.

Also do note, I did a quick benchmark on thin-link time for libLTO.dylib. thin-link was 2.6s before the change vs. 4.0s after the change. Building IRSymtab during thin-link does introduce non-negligible overhead. It might be possible to build them async in threads to reduce the overhead.

@pcc is this surprising? Typically we should just be loading it out of the bitcode file. There are cases where it has to be rebuilt, but theoretically those should be exceptions.

Apr 4 2019, 2:35 PM · Restricted Project
pcc added inline comments to D60253: [gn] Support for building runtimes.
Apr 4 2019, 9:05 AM · Restricted Project

Apr 3 2019

pcc committed rG8238604259e6: ELF: Move SymtabSHNDX and getSectionIndex() to ObjFile. NFCI. (authored by pcc).
ELF: Move SymtabSHNDX and getSectionIndex() to ObjFile. NFCI.
Apr 3 2019, 8:15 PM
pcc committed rL357670: ELF: Move SymtabSHNDX and getSectionIndex() to ObjFile. NFCI..
ELF: Move SymtabSHNDX and getSectionIndex() to ObjFile. NFCI.
Apr 3 2019, 8:12 PM
pcc committed rLLD357670: ELF: Move SymtabSHNDX and getSectionIndex() to ObjFile. NFCI..
ELF: Move SymtabSHNDX and getSectionIndex() to ObjFile. NFCI.
Apr 3 2019, 8:12 PM
pcc closed D60244: ELF: Move SymtabSHNDX and getSectionIndex() to ObjFile. NFCI..
Apr 3 2019, 8:12 PM · Restricted Project
pcc created D60244: ELF: Move SymtabSHNDX and getSectionIndex() to ObjFile. NFCI..
Apr 3 2019, 8:03 PM · Restricted Project
pcc created D60242: Add IR support, ELF section and user documentation for partitioning feature..
Apr 3 2019, 5:34 PM · Restricted Project

Apr 2 2019

pcc committed rGa720381bb59e: Fix problem with ar_to_bc.sh script introduced by r357450. (authored by pcc).
Fix problem with ar_to_bc.sh script introduced by r357450.
Apr 2 2019, 10:50 AM
pcc committed rCRT357502: Fix problem with ar_to_bc.sh script introduced by r357450..
Fix problem with ar_to_bc.sh script introduced by r357450.
Apr 2 2019, 10:46 AM
pcc committed rL357502: Fix problem with ar_to_bc.sh script introduced by r357450..
Fix problem with ar_to_bc.sh script introduced by r357450.
Apr 2 2019, 10:46 AM

Apr 1 2019

pcc added inline comments to D54175: [PGO] context sensitive PGO.
Apr 1 2019, 9:00 PM · Restricted Project
pcc added a comment to D60059: [Driver] implement -feverything.

enable all runtime sanitizers for extra safety

Brilliant idea. But I wonder how that could be done for -fsanitize. ASAN and MSAN can't be used together.

Nonsense.
There is a patch that allows to offload the shadow memory onto the cloud via blockchain,
in encrypted form for extra security of course. That will allow to use both sanitizers together.

Apr 1 2019, 12:21 PM · Restricted Project, Restricted Project
pcc committed rGa9e847238e19: ELF: Perform per-section .ARM.exidx processing during combineEhFrameSections(). (authored by pcc).
ELF: Perform per-section .ARM.exidx processing during combineEhFrameSections().
Apr 1 2019, 11:03 AM
pcc committed rLLD357417: ELF: Perform per-section .ARM.exidx processing during combineEhFrameSections()..
ELF: Perform per-section .ARM.exidx processing during combineEhFrameSections().
Apr 1 2019, 11:00 AM
pcc committed rL357417: ELF: Perform per-section .ARM.exidx processing during combineEhFrameSections()..
ELF: Perform per-section .ARM.exidx processing during combineEhFrameSections().
Apr 1 2019, 10:59 AM
pcc closed D60026: ELF: Perform per-section .ARM.exidx processing during combineEhFrameSections(). NFCI..
Apr 1 2019, 10:59 AM · Restricted Project
pcc added a comment to D60026: ELF: Perform per-section .ARM.exidx processing during combineEhFrameSections(). NFCI..

I'm happy to make the change. One minor reservation is that from combineEHSections to ARMExidxSections::finalize() the section will report its size as 0 and each individual ARMExidx InputSection won't have a parent. To the best of my knowledge this doesn't matter right now as nothing depends on these being set during that time. It may give someone a surprise in the future though.

Apr 1 2019, 10:43 AM · Restricted Project