[llvm-bugs] [Bug 49257] -mharden-sls=all caused some kernels fail too boot

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 18 17:28:43 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49257

Nick Desaulniers <ndesaulniers at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Nick Desaulniers <ndesaulniers at google.com> ---
Projects that manually specify linker scripts (via `-T` arg to linker) should
explicitly place these sections via their custom linker scripts.

For the aarch64 Linux kernel, arch/arm64/kernel/vmlinux.lds.S should be
modified, specifically the .text section output section listing should include
a list of these sections.  Otherwise the linker may place these orphan code
sections outside of the _stext/_etext linker symbols which are used to denote a
boundary of code to be mapped at runtime, which is a common cause of boot
failures.

I don't think the toolchain should be modified to not place these thunks in
custom sections; I think the custom linker script used in the kernel should be
modified.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210219/b2b268a7/attachment.html>


More information about the llvm-bugs mailing list