linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 0/2] efi: Fix alignenment issues in unaccepted memory code
@ 2026-02-17 10:49 Kiryl Shutsemau (Meta)
  2026-02-17 10:49 ` [PATCHv2 1/2] efi: Fix reservation of unaccepted memory table Kiryl Shutsemau (Meta)
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Kiryl Shutsemau (Meta) @ 2026-02-17 10:49 UTC (permalink / raw)
  To: Ard Biesheuvel, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, Tom Lendacky
  Cc: x86, linux-efi, linux-mm, linux-kernel, Moritz Sanft,
	Mike Rapoport, Kiryl Shutsemau (Meta)

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(-)

-- 
2.51.2



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-02-19  9:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-17 10:49 [PATCHv2 0/2] efi: Fix alignenment issues in unaccepted memory code Kiryl Shutsemau (Meta)
2026-02-17 10:49 ` [PATCHv2 1/2] efi: Fix reservation of unaccepted memory table Kiryl Shutsemau (Meta)
2026-02-17 10:49 ` [PATCHv2 2/2] efi: Align unaccepted memory range to page boundary Kiryl Shutsemau (Meta)
2026-02-17 10:58 ` [PATCHv2 0/2] efi: Fix alignenment issues in unaccepted memory code Ard Biesheuvel
2026-02-17 12:09 ` Mike Rapoport
2026-02-17 13:56 ` Tom Lendacky
2026-02-19  9:26   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox