diff options
| author | Kiryl Shutsemau (Meta) <kas@kernel.org> | 2026-02-17 10:49:56 +0000 |
|---|---|---|
| committer | Ard Biesheuvel <ardb@kernel.org> | 2026-02-18 11:26:20 +0100 |
| commit | 0862438c90487e79822d5647f854977d50381505 (patch) | |
| tree | 885ec0b6c6bc72b203ba5af74c74251df5ed9049 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 21279b1096b1546cc71dbf2f0b50df9151bd3421 (diff) | |
efi: Fix reservation of unaccepted memory table
The reserve_unaccepted() function incorrectly calculates the size of the
memblock reservation for the unaccepted memory table. It aligns the
size of the table, but fails to account for cases where the table's
starting physical address (efi.unaccepted) is not page-aligned.
If the table starts at an offset within a page and its end crosses into
a subsequent page that the aligned size does not cover, the end of the
table will not be reserved. This can lead to the table being overwritten
or inaccessible, causing a kernel panic in accept_memory().
This issue was observed when starting Intel TDX VMs with specific memory
sizes (e.g., > 64GB).
Fix this by calculating the end address first (including the unaligned
start) and then aligning it up, ensuring the entire range is covered
by the reservation.
Fixes: 8dbe33956d96 ("efi/unaccepted: Make sure unaccepted table is mapped")
Reported-by: Moritz Sanft <ms@edgeless.systems>
Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
