From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DFFB1324705 for ; Thu, 19 Feb 2026 09:26:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771493183; cv=none; b=Dp/+U9DABZyxJgmmPeMQnDw2U0DRSuj2UbvR11ciaBiK8kv+lMHGVMSer3WVpFddXbNYJqkA0sqVBesdqhWBS3H2dpnc5kxGvxDEQrP1Mu0Gyku78QckLR95XUFUXgUzQxNvTt+Er7/5R1GIPiBNYXrNBPmXZdnYqJLWQOsbgfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771493183; c=relaxed/simple; bh=9IclTx3lnPUxxtiARPih/U1FVwMbLyJFU7PQnzSllf4=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=k+yH9iMILNQU/2ZC1Z0E4vbJ6GZvGrTJ/8HHv5qH4jxuFBSvuET3CoHFcTRdlwCeSGBe7EQJRfZ0FYls1zmg/rEPaOiB2+EoQhfLDXicaND8nd5MW0pY542jedCAYa/AZyWoTYnEDZ+sJMJJ4GBjgaBtacLts2ZlmxVea0CadOo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nKrqWnrx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nKrqWnrx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 601E9C19421; Thu, 19 Feb 2026 09:26:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771493182; bh=9IclTx3lnPUxxtiARPih/U1FVwMbLyJFU7PQnzSllf4=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=nKrqWnrxk/UF0dc76GuL2WEo9lMnE1oUET+8joSutIUpaRDwFkIK8uX4+648Vntz8 soSrP7DfJNcuaYzBuyopcgRG7XVcUvaD495M0EGVcBaKexwxKL2CDn7UpryxTuC8W+ z9lhtmdxX76GZPH9oBopTHBsdt4jH/kwusOZg0yf6gVpzD3RxeSb28rTwoW18zm14s fgEMkOBatQPpfdQhtiKHraGzhWZXjkL+6qNJw/s0YBgy+BcS777batPgK6Nw5hrGZm t5QEQTKTmNjxgSDYywE9agrNNwyUdq21Q1/IkRphl+TNllhLQ4wNalV85+Ne+/rMWf iQaOMDcSnE5Aw== Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfauth.phl.internal (Postfix) with ESMTP id 47411F40069; Thu, 19 Feb 2026 04:26:21 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-01.internal (MEProxy); Thu, 19 Feb 2026 04:26:21 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvvdehudeiucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrugcu uehivghshhgvuhhvvghlfdcuoegrrhgusgeskhgvrhhnvghlrdhorhhgqeenucggtffrrg htthgvrhhnpedvueehiedtvedtleekuddutefgffdtleetfeetveejveejieehfefhjeei jeefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhguodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdduieejtdehtddtjeel qdeffedvudeigeduhedqrghruggspeepkhgvrhhnvghlrdhorhhgseifohhrkhhofhgrrh gurdgtohhmpdhnsggprhgtphhtthhopeduvddpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtohepsghpsegrlhhivghnkedruggvpdhrtghpthhtohepthhhohhmrghsrdhlvghnug grtghkhiesrghmugdrtghomhdprhgtphhtthhopehmshesvggughgvlhgvshhsrdhshihs thgvmhhspdhrtghpthhtohepkhgrsheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprh hpphhtsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehtghhlgieskhgvrhhnvghlrdho rhhgpdhrtghpthhtohepgiekieeskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinh hugidqmhhmsehkvhgrtghkrdhorhhgpdhrtghpthhtohepuggrvhgvrdhhrghnshgvnhes lhhinhhugidrihhnthgvlhdrtghomh X-ME-Proxy: Feedback-ID: ice86485a:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 27767700069; Thu, 19 Feb 2026 04:26:21 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AvPcN72_GPoV Date: Thu, 19 Feb 2026 10:26:00 +0100 From: "Ard Biesheuvel" To: "Tom Lendacky" , "Kiryl Shutsemau (Meta)" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "Dave Hansen" Cc: x86@kernel.org, linux-efi@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Moritz Sanft" , "Mike Rapoport" Message-Id: <2f46f365-160a-4a06-b8cc-b2d94f68033b@app.fastmail.com> In-Reply-To: References: <20260217104957.249340-1-kas@kernel.org> Subject: Re: [PATCHv2 0/2] efi: Fix alignenment issues in unaccepted memory code Content-Type: text/plain Content-Transfer-Encoding: 7bit On Tue, 17 Feb 2026, at 14:56, Tom Lendacky wrote: > On 2/17/26 04:49, Kiryl Shutsemau (Meta) wrote: >> This series addresses two issues related to unaligned physical addresses >> and sizes when handling EFI unaccepted memory. These issues were >> identified as potential sources of kernel panics in Intel TDX >> environments due to incomplete memory reservation or missing "guard page" >> extensions. >> >> The first patch fixes the reservation of the unaccepted memory table >> itself in efi_config_parse_tables(). It ensures the entire page range >> covering the table is reserved even if the table doesn't start on a >> page boundary. >> >> The second patch ensures that memory acceptance requests in >> accept_memory() and range_contains_unaccepted_memory() are page-aligned >> before performing the unit_size alignment check. This prevents skipping >> the necessary "guard page" extension for unaligned ranges, which is >> required to avoid crashes with load_unaligned_zeropad(). >> >> v2: >> - Fix 'end' calculation in the second patch (Tom) >> >> Kiryl Shutsemau (Meta) (2): >> efi: Fix reservation of unaccepted memory table >> efi: Align unaccepted memory range to page boundary >> >> drivers/firmware/efi/efi.c | 8 ++++---- >> drivers/firmware/efi/unaccepted_memory.c | 10 ++++++++-- >> 2 files changed, 12 insertions(+), 6 deletions(-) > > Reviewed-by: Tom Lendacky > Thanks - I've queued this up now.