mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: James Le Cuirot <chewi@gentoo.org>,
	Ard Biesheuvel <ardb@kernel.org>, Ingo Molnar <mingo@kernel.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>
Subject: Re: [PATCH] x86: fix oops caused by old EFI info on kexec boot
Date: Thu, 4 Dec 2025 15:18:11 -0800	[thread overview]
Message-ID: <a9210f8c-1290-47ba-9382-ddfbeadd483f@zytor.com> (raw)
In-Reply-To: <552cf43e8ce7c7e430cd18feb20efb1dee2350e0.camel@gentoo.org>

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@zytor.com>


      reply	other threads:[~2025-12-04 23:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26 17:32 James Le Cuirot
2025-12-03 18:12 ` Ingo Molnar
2025-12-03 20:59   ` H. Peter Anvin
2025-12-03 21:27     ` H. Peter Anvin
2025-12-06 11:45       ` Ingo Molnar
2025-12-03 22:57   ` Ard Biesheuvel
2025-12-03 23:01     ` Ard Biesheuvel
2025-12-04 21:40       ` James Le Cuirot
2025-12-04 23:18         ` H. Peter Anvin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a9210f8c-1290-47ba-9382-ddfbeadd483f@zytor.com \
    --to=hpa@zytor.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=chewi@gentoo.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®