[PATCH] D96164: [lld-macho] add code signature for native arm64 macOS

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 15 05:46:12 PST 2021


thakis added a comment.

In D96164#2562720 <https://reviews.llvm.org/D96164#2562720>, @gkm wrote:

> In D96164#2562701 <https://reviews.llvm.org/D96164#2562701>, @gkm wrote:
>
>> In D96164#2562655 <https://reviews.llvm.org/D96164#2562655>, @thakis wrote:
>>
>>> Re the copy stuff: See the CL desc and openradar link in https://reviews.llvm.org/rGba3bc2fd41b8428904fc779e353d3769074d8982
>>
>> That is good to know. This case differs: LLD is not overwriting an existing file, so is not reusing an vnode. There is something funky in `FileOutputBuffer`, which creates the LLD output file via mmap(2).
>
> Travis Hill <travis at xojo.com> fed me the answer. The Go peeps had the same problem: https://go-review.googlesource.com/c/go/+/272258
> The Darwin kernel caches signature verification results by vnode. mmap(2) creates the cache entry, before we have written anything to the output. The fix is to invalidate the cache after writing via `msync(..., MS_INVALIDATE);`

Ah, the mmap one is https://openradar.appspot.com/FB8914231 :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96164/new/

https://reviews.llvm.org/D96164



More information about the llvm-commits mailing list