Re: [RFC PATCH 25/28] x86: Use PIE codegen for the core kernel

Andi Kleen
2024-09-25T21:09:47Z

Ard Biesheuvel <ardb+git@google.com> writes:
> This substantially reduces the number of relocations that need to be
> processed when booting a relocatable KASLR kernel.
>
> Before (size in bytes of the reloc table):
>
> 797372 arch/x86/boot/compressed/vmlinux.relocs
>
> After:
>
> 400252 arch/x86/boot/compressed/vmlinux.relocs

I don't know why anybody would care about the size of the relocation table?

What matters is what it does to general performance.

Traditionally even on x86-64 PIC/E has a cost and the kernel model
was intended to avoid that.

From my perspective this patch kit doesn't fix a real problem,
it's all risk of performance regression with no gain.

-Andi