Re: [PATCH] x86: Make the 64-bit bzImage always physically relocatable
From: Ard Biesheuvel
Date: Wed Nov 18 2026 - 11:57:35 EST
On Wed, 18 Nov 2026, at 17:29, H. Peter Anvin wrote:
> On November 18, 2026 8:18:44 AM PST, Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
>>
>>
>>On Wed, 18 Nov 2026, at 16:51, H. Peter Anvin wrote:
>>> On November 11, 2026 1:18:44 AM PST, Ard Biesheuvel <ardb+git@xxxxxxxxxx> wrote:
>>>>From: Ard Biesheuvel <ardb@xxxxxxxxxx>
>>>>
>>>>On x86_64, the physical placement of the kernel is independent from its
>>>>mapping in the 'High Kernel Mapping' range. This means that even a
>>>>position dependent kernel built without boot-time relocation support can
>>>>run from any suitably aligned physical address, and there is no need to
>>>>make this behavior dependent on whether or not the kernel is virtually
>>>>relocatable.
>>>>
>>>>On i386, the situation is different, given that the physical and virtual
>>>>load offsets must be equal, and so only a relocatable kernel can be
>>>>loaded at a physical address that deviates from its build-time default.
>>>>
>>>>Clarify this in Kconfig and in the code, and advertise the 64-bit
>>>>bzImage as loadable at any physical offset regardless of whether
>>>>CONFIG_RELOCATABLE is set. In practice, this makes little difference,
>>>>given that it defaults to 'y' and is a prerequisite for EFI_STUB and
>>>>RANDOMIZE_BASE, but it will help with some future refactoring of the
>>>>relocation code.
>>>>
>>>>Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
>>>>---
>>>> arch/x86/Kconfig | 40 ++++++++++++++++++------------
>>>> arch/x86/boot/compressed/head_64.S | 4 ---
>>>> arch/x86/boot/compressed/misc.c | 8 +++---
>>>> arch/x86/boot/header.S | 8 ++----
>>>> 4 files changed, 29 insertions(+), 31 deletions(-)
>>>>
...
> I'm going to vote NAK on this one... I was already thinking that it
> would mess up low-level debugging too much,
How so? The last time I proposed this, you replied that you were
planning to do this yourself.
https://lore.kernel.org/all/3f2e8d7c-6029-49ef-8e31-a3eb5efb385b@xxxxxxxxx/