Re: [PATCH] x86/tools: deal with 64-bit relative relocations for per-CPU symbols
From: Josh Poimboeuf
Date: Fri May 24 2019 - 13:45:31 EST
On Wed, May 22, 2019 at 06:40:57PM +0100, Ard Biesheuvel wrote:
> In order to fix an issue in the place relative ksymtab code, we
> need to switch to 64-bit place relative references, which
> require special handling in the x86 'relocs' tool. The reason
> is that per-CPU symbols on x86_64 live in a separate link time
> section, whose load time address is not reflected in the ELF
> metadata, and so relative references emitted by the toolchain
> are guaranteed to be wrong.
>
> So fix this by extending the handling of 32-bit relative references
> to per-CPU variables to support 64-bit relative references as
> well.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@xxxxxxx>
> ---
> This is a follow-up to [0] and a prerequisite to the change it
> implements: using 64-bit relative references on x86_64 requires
> this handling in the 'relocs' tool and in the decompressor.
>
> [0] https://lore.kernel.org/linux-arm-kernel/20190522150239.19314-1-ard.biesheuvel@xxxxxxx
>
> This patch plus [0] build and boot tested with x86_64_defconfig on QEMU/kvm + OVMF.
NACK based on
https://lkml.kernel.org/r/f2141ee5-d07a-6dd9-47c6-97e8fbdccf34@xxxxxxx
--
Josh