From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9C96369994 for ; Fri, 6 Mar 2026 05:42:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772775741; cv=none; b=kbb3dTVqBp61mWbU2UeDN643zYs5hEsCsJOTfowDsBNhxMaBSws+rX9eqQryLHglNRrjUuwDFsmN2M2Uzo/GdThgcjcS51FWT+lXpf3aftYl2K3xEkK0KGAWRjecIaJVFwIaEuAnTnK5dd/dv12wPG8h/aR5DW8+6ONJt0SVxMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772775741; c=relaxed/simple; bh=lHtClqQODz2/glyZK4vJ7nvGDP7fzlPgPf1O3N4lSZs=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pofz+yumIDdjC0ccBeCnT4iywT6YlMTL8Etb5JakcstRDixNimf+B5B+6vOMOq7u6iwyB3RjiJpwJGiJ2Bzcu6pqMVA9hK3xVzXsFzNdfnTiThR0xnv3Y98UHrnrQdtGeP4oWtnBu/5uersnFiwHQra/XhdJPmQgDW3zcWNYj2k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=SNQEI8pl; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="SNQEI8pl" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4806f3fc50bso95931135e9.0 for ; Thu, 05 Mar 2026 21:42:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1772775738; x=1773380538; darn=vger.kernel.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:date:from:from:to:cc:subject:date :message-id:reply-to; bh=bXuimAwpOjteei+zeJ3XJ05LznjxPAq8p3+xtzsfeMg=; b=SNQEI8pll2W2z1N+M9dJzKPobfNuQg/1v+xQrq0XfWh555sEdx8V4GpbIvkDFsmF89 gbpAqL422/MbXydQbs61yMIkaLlXvyNkh5cJO7z265PcIP1srBvGzjLNALmjOLUHdlPU uT3BV6N8wsvngHVxVgS2hDb10hEFl6QannVAJpWCM43XYnhzCgZkE9uTIAPkqH9IRB0J b8429z0msj6VvMUW/Sz+gahldsFUNcBc/7Bh3sNbmmeGuIVYq9qOTH1xZQeHGQO5PKF5 OYPUfSpd0thXPus4Mp6zLGwCfR6ZVwb9yS2jR+V5yoVXUr2nw2X/7oW2pxJfnuxHop+S ixlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772775738; x=1773380538; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:date:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bXuimAwpOjteei+zeJ3XJ05LznjxPAq8p3+xtzsfeMg=; b=UEaM0E6qzPhozKvTfUbyNZb2OYoycb46CMSZFUNy9wRmi3DqVt/M+pQ+kADt0TY7Iy BGecVeJgno8RxpaOXQ66WsfFKb0WHyUZEkx9dZNi1ce7MCS970kLm1SSUN/fJqJnT7SC 1rJ2BKgU7RRikT2VkTjoi2/dK9Xxzw3y78VcvAYIkxVs3uwHp3LtLNnwL9ILH9sf9Y2S OQMjpkSGElhcqofrWhXZ5ckLau+LIRmp10amn8w9jfqZt1szZaCmfbzftGkL1xbf+48/ lnzqz0Y3RWKQ2MgZ32bIEVBWurt3Zcir6Et/vj0MqBdWaOimxtPByYF7gzAPKh+b1jU2 7mlw== X-Gm-Message-State: AOJu0YyNsG6y9eOk9uheu/3vjE1nU0IeCImROMOqOaxUCsB/clgGLz/e ePSpJualUmNlIJkzaH/s3E7RsUC3wBFykHBrexrW0myXLcmeU+HWV8zHipPTMENjq2fhpBZJnMG 6+8W8 X-Gm-Gg: ATEYQzyJkq9Vzx2l7BkXRPPSCCmfE1jn/EUyyaVhs8+V3FcW+oD8j9/7rrwN04yCchm YW56w75o/FIjikESYPfxOroePfUAd2HOvHp3Xl7O2M3ViNoXd9F8WLVbXmRpXnKOnf/sYF0xRjB Lgyf/rWSLVQuFLMFRQNKU494XhuIiEO7Yx3H/qeJwVQqKrxJK8qHfF7bprEZJP5Y8HHDX8XRsEf REal5+e7+tafGaLyrtWBpM2kby3gPyd+f/6QtDhG+FvZ5uDAL0SkxVztMWttwFnzgwnEDOCgEAB Ej4zI8e2IAKNCqX16u17oDRCgLvoiOSThUPQUCTn2TgnrU9HbE1nz5E2uPEJtmZjdOG+vL8rZKU R9Q3tGVcoExVKTW+/ZwUOry1vUNo1Za4iVRQtQF77eBN+ernlZ5EkMxLcuB+rqTBrsTwJQcG0Jq 3i8OePYrwfDEq1Ud5EnE6QoItBDcZRZDbQekHRCpP4XxA= X-Received: by 2002:a05:600c:4ece:b0:47d:264e:b35a with SMTP id 5b1f17b1804b1-485269305a5mr10886455e9.13.1772775738190; Thu, 05 Mar 2026 21:42:18 -0800 (PST) Received: from r1chard (1-164-74-26.dynamic-ip.hinet.net. [1.164.74.26]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-829a48648d9sm458470b3a.31.2026.03.05.21.42.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Mar 2026 21:42:17 -0800 (PST) From: Richard Lyu X-Google-Original-From: Richard Lyu Date: Fri, 6 Mar 2026 13:42:12 +0800 To: linux-kernel@vger.kernel.org Cc: linux-efi@vger.kernel.org, x86@kernel.org, Ard Biesheuvel , stable@vger.kernel.org, Dave Young Subject: Re: [PATCH] x86/kexec: Copy ACPI root pointer address from config table Message-ID: References: <20260217163532.5166-1-ardb@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20260217163532.5166-1-ardb@kernel.org> User-Agent: Mutt/2.2.13 (2024-03-09) On 2026/02/17 17:35, Ard Biesheuvel wrote: >Dave reports that kexec may fail when the first kernel boots via the EFI >stub but without EFI runtime services, as in that case, the RSDP address >field in struct bootparams is never assigned. Kexec copies this value >into the version of struct bootparams that it provides to the incoming >kernel, which may have no other means to locate the ACPI root pointer. > >So take the value from the EFI config tables if no root pointer has been >set in the first kernel's struct bootparams. > >Fixes: a1b87d54f4e4 ("x86/efistub: Avoid legacy decompressor when doing EFI boot") >Cc: # v6.1 >Reported-by: Dave Young >Tested-by: Dave Young >Link: https://lore.kernel.org/linux-efi/aZQg_tRQmdKNadCg@darkstar.users.ipa.redhat.com/ >Signed-off-by: Ard Biesheuvel >--- >Unless anyone minds, I intend to take this via the EFI tree as a fix. > > arch/x86/kernel/kexec-bzimage64.c | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/arch/x86/kernel/kexec-bzimage64.c b/arch/x86/kernel/kexec-bzimage64.c >index 7508d0ccc740..24aec7c1153f 100644 >--- a/arch/x86/kernel/kexec-bzimage64.c >+++ b/arch/x86/kernel/kexec-bzimage64.c >@@ -313,6 +313,12 @@ setup_boot_parameters(struct kimage *image, struct boot_params *params, > > /* Always fill in RSDP: it is either 0 or a valid value */ > params->acpi_rsdp_addr = boot_params.acpi_rsdp_addr; >+ if (IS_ENABLED(CONFIG_EFI) && !params->acpi_rsdp_addr) { >+ if (efi.acpi20 != EFI_INVALID_TABLE_ADDR) >+ params->acpi_rsdp_addr = efi.acpi20; >+ else if (efi.acpi != EFI_INVALID_TABLE_ADDR) >+ params->acpi_rsdp_addr = efi.acpi; >+ } > > /* Default APM info */ > memset(¶ms->apm_bios_info, 0, sizeof(params->apm_bios_info)); >-- 2.53.0.273.g2a3d683680-goog This change is good to me. Reviewed-by: Richard Lyu