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

Re: [PATCH v2 27/28] x86, relocs: Ignore L4_PAGE_OFFSET relocations

From: Sami Tolvanen <samitolvanen@google.com>
Date: 2020-09-08 23:28:47
Also in: linux-arch, linux-kbuild, linux-pci, lkml

On Thu, Sep 03, 2020 at 03:47:32PM -0700, Kees Cook wrote:
On Thu, Sep 03, 2020 at 01:30:52PM -0700, Sami Tolvanen wrote:
quoted
L4_PAGE_OFFSET is a constant value, so don't warn about absolute
relocations.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Any other details on this? I assume this is an ld.lld-ism. Any idea why
this is only a problem under LTO? (Or is this an LLVM integrated
assembler-ism?) Regardless, yes, let's nail it down:
With the LTO v1 series, LLD generated this relocation somewhere in the
.init.data section, but only with LTO:

  $ arch/x86/tools/relocs --abs-relocs vmlinux
  WARNING: Absolute relocations present
  Offset     Info     Type     Sym.Value Sym.Name
  ffffffff828e7fe0 0000000100000001 R_X86_64_64 0000000000000111
  L4_PAGE_OFFSET

It actually looks like this might not be a problem anymore with the
current ToT kernel and the v2 series, but I'll do some more testing to
confirm this and drop the patch from v3 if it's no longer needed.

Sami

_______________________________________________
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