Thread (212 messages) 212 messages, 19 authors, 2020-09-10

Re: [PATCH v2 01/28] x86/boot/compressed: Disable relocation relaxation

From: Nathan Chancellor <hidden>
Date: 2020-09-04 07:14:18
Also in: linux-arch, linux-kbuild, linux-pci, lkml

On Thu, Sep 03, 2020 at 07:42:15PM -0400, Arvind Sankar wrote:
On Thu, Sep 03, 2020 at 02:44:41PM -0700, Kees Cook wrote:
quoted
On Thu, Sep 03, 2020 at 01:30:26PM -0700, Sami Tolvanen wrote:
quoted
From: Arvind Sankar <redacted>

Patch series [4] is a solution to allow the compressed kernel to be
linked with -pie unconditionally, but even if merged is unlikely to be
backported. As a simple solution that can be applied to stable as well,
prevent the assembler from generating the relaxed relocation types using
the -mrelax-relocations=no option. For ease of backporting, do this
unconditionally.

[0] https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/linker-optimization.tex#L65
[1] https://lore.kernel.org/lkml/20200807194100.3570838-1-ndesaulniers@google.com/ (local)
[2] https://github.com/ClangBuiltLinux/linux/issues/1121
[3] https://reviews.llvm.org/rGc41a18cf61790fc898dcda1055c3efbf442c14c0
[4] https://lore.kernel.org/lkml/20200731202738.2577854-1-nivedita@alum.mit.edu/ (local)

Reported-by: Nick Desaulniers <redacted>
Signed-off-by: Arvind Sankar <redacted>
Reviewed-by: Kees Cook <redacted>

-- 
Kees Cook
Note that since [4] is now in tip, assuming it doesn't get dropped for
some reason, this patch isn't necessary unless you need to backport this
LTO series to 5.9 or below.

Thanks.
It is still necessary for tip of tree LLVM to work properly
(specifically clang and ld.lld) regardless of whether or not LTO is
used.

[4] also fixes it but I don't think it can be backported to stable so it
would still be nice to get it picked up so that it can be sent back
there. We have been carrying it in our CI for a decent amount of time...

Cheers,
Nathan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help