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

From: Andi Kleen
Date: Wed Sep 25 2024 - 17:09:55 EST


Ard Biesheuvel <ardb+git@xxxxxxxxxx> 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