joaomoreira added a comment.

In D140035#3998954 <https://reviews.llvm.org/D140035#3998954>, @samitolvanen 
wrote:

> In D140035#3996066 <https://reviews.llvm.org/D140035#3996066>, @joaomoreira 
> wrote:
>
>> Regarding not being able to reproduce this in kernel -- never mind... I was 
>> misled by setup issues while running IBT kernels in QEMU. I managed to fix 
>> the setup and confirm that kernel won't boot.
>
> OK, great. Thanks for double checking!
>
> The patch itself looks good to me, but I suspect ibt-seal in general has the 
> same issue as D138337 <https://reviews.llvm.org/D138337> where it can drop 
> endbr instructions from `isUsedInRegularObj` symbols that are not 
> address-taken in the bitcode (e.g. functions whose address is only taken in 
> stand-alone assembly). I saw this issue only in the arm64 Linux kernel, but 
> there's always a chance a similar code pattern emerges on the x86 side at 
> some point in future too. This can obviously be worked around in the kernel, 
> but just something to keep in mind.

Ugh, yeah. I reproduced the behavior with a .s and a .C file on a similar 
scheme as the repro you wrote for the thin lto problem. I'll start looking for 
a fix once I'm back from vacation in Jan. Tks for pointing this out.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140035

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to