From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8AB8398FAB for ; Thu, 4 Dec 2025 23:19:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764890357; cv=none; b=bov1LM5+XcmPh6zJ/xldbOipqQr0gaNSshZdNSUxAVV49LkOtuyq79MUnvmFRmvfNvMmBVk5aFKK1zUyzjteomYPqiedu15XTcNb3OVO4KjKg12IGZxNJ05Hs9LEpksND0Va0OtI9ay4oNpjiHd1mt1QhRq9wg0lYf7Xqk4oJkQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764890357; c=relaxed/simple; bh=VRovnU1o9qHuoUr1LzyZqMw+TjUIN3u5lD5HyLvWvgU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lHS/F04uykmPf84TJvyVaOvCBZ4qLWYMEYo3DzeY5eNssg1InsfRjsTx2wXQFXpKiZNudrKeIL+OfN08lqNvuHJ8HCA/yjlOTzGSfL0d3DC3dmQIuhbalfH+E4u450h9qQ/LXHuCN/jQ/ORbZsN2eDUnlVqH97UE91l80Bg1gmc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=CrsjrJBA; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="CrsjrJBA" Received: from [IPV6:2601:646:8081:9483:7df1:87f9:6767:1234] ([IPv6:2601:646:8081:9483:7df1:87f9:6767:1234]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 5B4NIG7l024336 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Thu, 4 Dec 2025 15:18:19 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 5B4NIG7l024336 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025112201; t=1764890300; bh=o+r51+bk6scvIwgm9C5xVDJnBmRzmRBx/MXoRVFwjhA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=CrsjrJBAJSNTXCI2HjcUXOtaEVcGA51yV8cqRqNdHoY/F5rIHSE4BWtVbb5O/u9z+ jQspZlEBDhaC7a6gV/EhvgG9NwAmIKj+hxV22RzK3NJVssuLwVPGqVEZQHt2Qu7YiB PRQDuEsKOiCNOSVtL2rYkxBcK6U3IYLOouUY5Ifl7NvCVTA/fBq8gdzTOLF6Luzodt kYx3js2hdP48O4rPx3ywGe8Nw81m2PhEcKqfZpXcsuRn2BcdR1e+Ti4oAh0rul6oU0 6AcRG8SfXmAfIimrCKOHj/g57zl+odYxrf7mEnruvSPQ2KWRg1/61UXDMq0gGfF//8 kvsGmg8ZRGISw== Message-ID: Date: Thu, 4 Dec 2025 15:18:11 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] x86: fix oops caused by old EFI info on kexec boot To: James Le Cuirot , Ard Biesheuvel , Ingo Molnar Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Borislav Petkov , Dave Hansen References: <20251126173209.374755-2-chewi@gentoo.org> <552cf43e8ce7c7e430cd18feb20efb1dee2350e0.camel@gentoo.org> Content-Language: en-US, sv-SE From: "H. Peter Anvin" In-Reply-To: <552cf43e8ce7c7e430cd18feb20efb1dee2350e0.camel@gentoo.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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)