From nobody Sat Feb 7 22:24:16 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 0239C170A2C for ; Thu, 23 Jan 2025 06:36:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737614199; cv=none; b=hHBPxtpR69alrCiFe27r1+Q67OfAZ592tcMiOXpCbqbZHlgMdUDsFcg5iNSURUb2hF7xbbxQmZxS3khUsyFSOyuKomjPbH/WQAq+UqiOA7PUOVLAlm+qWwHmi3t2yhZ9vlWZZM5cUoTm5BHpO24ORWTr8rsEtz4zPgsJBlDYRug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737614199; c=relaxed/simple; bh=GohUX9iX1KdYZfsFRrNlin2/Z4yhmVpAyvrZnsO3XVY=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=n8rw9f9Vc9kGIFmG++WYtnM6WicdfrMGX0wDSH9ASnddQphi6zh+oU96W/NMrhJtu6LVCjPzTzrrvNMZZPUpGJREaRMHqIMFhAk6gu2CCpIlHSa9i2GrSvvNbb83o4wgYG+wbLcVbo48ZhmcR+grxU2qm9djpxznWB/9lboo+ZA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bdwT+99j; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bdwT+99j" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737614196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=9GWnA6cQazWu1ukn6JyrCDn9phCCCsDqKbbThQSvZEM=; b=bdwT+99j/8rbHy/xQgJGDdf78QjNbsQFS3miamUZljMBhDz2NAhejCQjSPviPzt7T+9FQq ByO7xuZM5X3oElMgN3GkSIAlpulBS3sGUCxxWs6q3mVHApR6nf2O7v9xXOww6rVoLyOsAF 6gnVz6jJ3pEEB/oeA1FXp1+qRr7y4hU= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-577-4SHC3acIOBiWlyhUCODqXg-1; Thu, 23 Jan 2025 01:36:32 -0500 X-MC-Unique: 4SHC3acIOBiWlyhUCODqXg-1 X-Mimecast-MFC-AGG-ID: 4SHC3acIOBiWlyhUCODqXg Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6E49F195396F; Thu, 23 Jan 2025 06:36:18 +0000 (UTC) Received: from darkstar.users.ipa.redhat.com (unknown [10.72.112.125]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E2F89195608A; Thu, 23 Jan 2025 06:36:13 +0000 (UTC) Date: Thu, 23 Jan 2025 14:36:27 +0800 From: Dave Young To: Ard Biesheuvel , Usama Arif Cc: linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Breno Leitao , kexec@lists.infradead.org, x86@kernel.org Subject: [PATCH] x86/efi: skip memattr table on kexec boot Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" efi_memattr_init() added a sanity check to avoid firmware caused corruption. The check is based on efi memmap entry numbers, but kexec only takes the runtime related memmap entries thus this caused many false warnings, see below thread for details: https://lore.kernel.org/all/20250108215957.3437660-2-usamaarif642@gmail.com/ Ard suggests to skip the efi memattr table in kexec, this makes sense becau= se those memattr fixups are not critical. Reported-by: Breno Leitao Reported-and-tested-by: Usama Arif Suggested-by: Ard Biesheuvel Signed-off-by: Dave Young diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c index 846bf49f2508..553f330198f2 100644 --- a/arch/x86/platform/efi/quirks.c +++ b/arch/x86/platform/efi/quirks.c @@ -561,6 +561,11 @@ int __init efi_reuse_config(u64 tables, int nr_tables) =20 if (!efi_guidcmp(guid, SMBIOS_TABLE_GUID)) ((efi_config_table_64_t *)p)->table =3D data->smbios; + + /* Do not bother to play with mem attr table across kexec */ + if (!efi_guidcmp(guid, EFI_MEMORY_ATTRIBUTES_TABLE_GUID)) + ((efi_config_table_64_t *)p)->table =3D EFI_INVALID_TABLE_ADDR; + p +=3D sz; } early_memunmap(tablep, nr_tables * sz);