[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a9210f8c-1290-47ba-9382-ddfbeadd483f@zytor.com>
Date: Thu, 4 Dec 2025 15:18:11 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: James Le Cuirot <chewi@...too.org>, Ard Biesheuvel <ardb@...nel.org>,
Ingo Molnar <mingo@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH] x86: fix oops caused by old EFI info on kexec boot
On 2025-12-04 13:40, James Le Cuirot wrote:
>>>
>>> It might be better to fix this in the generic EFI code, and simply
>>> wipe the EFI config table that the EFI stub created to pass the initrd
>>> info. That way, it works for all architectures, and there is no need
>>> for special x86 hacks.
>>
>> I.e.,
>>
>> --- a/drivers/firmware/efi/efi.c
>> +++ b/drivers/firmware/efi/efi.c
>> @@ -818,6 +818,7 @@
>> if (tbl) {
>> phys_initrd_start = tbl->base;
>> phys_initrd_size = tbl->size;
>> + tbl->base = tbl->size = 0;
>> early_memunmap(tbl, sizeof(*tbl));
>> }
>> }
>
> I can confirm that this fixes the problem. I had considered wiping the table,
> but I was trying to do it later, which seemed harder to do. I didn't consider
> wiping it immediately, but I now realise this data isn't needed afterwards. I
> only tested amd64, but I trust it will work for other architectures. Please go
> ahead with this.
>
Acked-by: H. Peter Anvin (Intel) <hpa@...or.com>
Powered by blists - more mailing lists