All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20260225012403.077794761@linuxfoundation.org>

diff --git a/a/1.txt b/N1/1.txt
index 625e89f..431792a 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,38 +1,60 @@
-6.19-stable review patch.  If anyone has any objections, please let me know.
+6.18-stable review patch.  If anyone has any objections, please let me know.
 
 ------------------
 
-From: Francesco Dolcini <francesco.dolcini@toradex.com>
+From: Kiryl Shutsemau (Meta) <kas@kernel.org>
 
-[ Upstream commit 36ee9f8b1ae07fe82885a7a3553a5be347d3f978 ]
+[ Upstream commit 0862438c90487e79822d5647f854977d50381505 ]
 
-Change USB-C Sink PDO and the amount of power that the device can sink
-to zero to maximize compatibility with other USB peers (the Aquila
-Development Board is not sinking any current, it is self powered).
+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.
 
-Fixes: 39ac6623b1d8 ("arm64: dts: ti: Add Aquila AM69 Support")
-Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
-Link: https://patch.msgid.link/20251204134220.129304-2-francesco@dolcini.it
-Signed-off-by: Nishanth Menon <nm@ti.com>
+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>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts b/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts
-index c7ce804eac703..f48601ae38b7c 100644
---- a/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts
-+++ b/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts
-@@ -399,8 +399,8 @@ connector {
- 			try-power-role = "sink";
- 			self-powered;
- 			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
--			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
--			op-sink-microwatt = <1000000>;
-+			sink-pdos = <PDO_FIXED(5000, 0, PDO_FIXED_USB_COMM)>;
-+			op-sink-microwatt = <0>;
+ drivers/firmware/efi/efi.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
+index fc407d891348f..c3cf5541ed682 100644
+--- a/drivers/firmware/efi/efi.c
++++ b/drivers/firmware/efi/efi.c
+@@ -691,13 +691,13 @@ static __init int match_config_table(const efi_guid_t *guid,
+ 
+ static __init void reserve_unaccepted(struct efi_unaccepted_memory *unaccepted)
+ {
+-	phys_addr_t start, size;
++	phys_addr_t start, end;
+ 
+ 	start = PAGE_ALIGN_DOWN(efi.unaccepted);
+-	size = PAGE_ALIGN(sizeof(*unaccepted) + unaccepted->size);
++	end = PAGE_ALIGN(efi.unaccepted + sizeof(*unaccepted) + unaccepted->size);
+ 
+-	memblock_add(start, size);
+-	memblock_reserve(start, size);
++	memblock_add(start, end - start);
++	memblock_reserve(start, end - start);
+ }
  
- 			ports {
- 				#address-cells = <1>;
+ int __init efi_config_parse_tables(const efi_config_table_t *config_tables,
 -- 
 2.51.0
diff --git a/a/content_digest b/N1/content_digest
index 9c1f0f9..e6fc6d9 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,52 +1,77 @@
- "ref\020260225012359.695468795@linuxfoundation.org\0"
+ "ref\020260225012348.915798704@linuxfoundation.org\0"
  "From\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>\0"
- "Subject\0[PATCH 6.19 139/781] arm64: dts: ti: k3-am69-aquila-dev: Fix USB-C Sink PDO\0"
- "Date\0Tue, 24 Feb 2026 17:14:08 -0800\0"
+ "Subject\0[PATCH 6.18 601/641] efi: Fix reservation of unaccepted memory table\0"
+ "Date\0Tue, 24 Feb 2026 17:25:27 -0800\0"
  "To\0stable@vger.kernel.org\0"
  "Cc\0Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
   patches@lists.linux.dev
-  Francesco Dolcini <francesco.dolcini@toradex.com>
-  Nishanth Menon <nm@ti.com>
+  Moritz Sanft <ms@edgeless.systems>
+  Kiryl Shutsemau (Meta) <kas@kernel.org>
+  Tom Lendacky <thomas.lendacky@amd.com>
+  Mike Rapoport (Microsoft) <rppt@kernel.org>
+  Ard Biesheuvel <ardb@kernel.org>
  " Sasha Levin <sashal@kernel.org>\0"
  "\00:1\0"
  "b\0"
- "6.19-stable review patch.  If anyone has any objections, please let me know.\n"
+ "6.18-stable review patch.  If anyone has any objections, please let me know.\n"
  "\n"
  "------------------\n"
  "\n"
- "From: Francesco Dolcini <francesco.dolcini@toradex.com>\n"
+ "From: Kiryl Shutsemau (Meta) <kas@kernel.org>\n"
  "\n"
- "[ Upstream commit 36ee9f8b1ae07fe82885a7a3553a5be347d3f978 ]\n"
+ "[ Upstream commit 0862438c90487e79822d5647f854977d50381505 ]\n"
  "\n"
- "Change USB-C Sink PDO and the amount of power that the device can sink\n"
- "to zero to maximize compatibility with other USB peers (the Aquila\n"
- "Development Board is not sinking any current, it is self powered).\n"
+ "The reserve_unaccepted() function incorrectly calculates the size of the\n"
+ "memblock reservation for the unaccepted memory table. It aligns the\n"
+ "size of the table, but fails to account for cases where the table's\n"
+ "starting physical address (efi.unaccepted) is not page-aligned.\n"
  "\n"
- "Fixes: 39ac6623b1d8 (\"arm64: dts: ti: Add Aquila AM69 Support\")\n"
- "Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>\n"
- "Link: https://patch.msgid.link/20251204134220.129304-2-francesco@dolcini.it\n"
- "Signed-off-by: Nishanth Menon <nm@ti.com>\n"
+ "If the table starts at an offset within a page and its end crosses into\n"
+ "a subsequent page that the aligned size does not cover, the end of the\n"
+ "table will not be reserved. This can lead to the table being overwritten\n"
+ "or inaccessible, causing a kernel panic in accept_memory().\n"
+ "\n"
+ "This issue was observed when starting Intel TDX VMs with specific memory\n"
+ "sizes (e.g., > 64GB).\n"
+ "\n"
+ "Fix this by calculating the end address first (including the unaligned\n"
+ "start) and then aligning it up, ensuring the entire range is covered\n"
+ "by the reservation.\n"
+ "\n"
+ "Fixes: 8dbe33956d96 (\"efi/unaccepted: Make sure unaccepted table is mapped\")\n"
+ "Reported-by: Moritz Sanft <ms@edgeless.systems>\n"
+ "Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org>\n"
+ "Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>\n"
+ "Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>\n"
+ "Signed-off-by: Ard Biesheuvel <ardb@kernel.org>\n"
  "Signed-off-by: Sasha Levin <sashal@kernel.org>\n"
  "---\n"
- " arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts | 4 ++--\n"
- " 1 file changed, 2 insertions(+), 2 deletions(-)\n"
- "\n"
- "diff --git a/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts b/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts\n"
- "index c7ce804eac703..f48601ae38b7c 100644\n"
- "--- a/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts\n"
- "+++ b/arch/arm64/boot/dts/ti/k3-am69-aquila-dev.dts\n"
- "@@ -399,8 +399,8 @@ connector {\n"
- " \t\t\ttry-power-role = \"sink\";\n"
- " \t\t\tself-powered;\n"
- " \t\t\tsource-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;\n"
- "-\t\t\tsink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;\n"
- "-\t\t\top-sink-microwatt = <1000000>;\n"
- "+\t\t\tsink-pdos = <PDO_FIXED(5000, 0, PDO_FIXED_USB_COMM)>;\n"
- "+\t\t\top-sink-microwatt = <0>;\n"
+ " drivers/firmware/efi/efi.c | 8 ++++----\n"
+ " 1 file changed, 4 insertions(+), 4 deletions(-)\n"
+ "\n"
+ "diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c\n"
+ "index fc407d891348f..c3cf5541ed682 100644\n"
+ "--- a/drivers/firmware/efi/efi.c\n"
+ "+++ b/drivers/firmware/efi/efi.c\n"
+ "@@ -691,13 +691,13 @@ static __init int match_config_table(const efi_guid_t *guid,\n"
+ " \n"
+ " static __init void reserve_unaccepted(struct efi_unaccepted_memory *unaccepted)\n"
+ " {\n"
+ "-\tphys_addr_t start, size;\n"
+ "+\tphys_addr_t start, end;\n"
+ " \n"
+ " \tstart = PAGE_ALIGN_DOWN(efi.unaccepted);\n"
+ "-\tsize = PAGE_ALIGN(sizeof(*unaccepted) + unaccepted->size);\n"
+ "+\tend = PAGE_ALIGN(efi.unaccepted + sizeof(*unaccepted) + unaccepted->size);\n"
+ " \n"
+ "-\tmemblock_add(start, size);\n"
+ "-\tmemblock_reserve(start, size);\n"
+ "+\tmemblock_add(start, end - start);\n"
+ "+\tmemblock_reserve(start, end - start);\n"
+ " }\n"
  " \n"
- " \t\t\tports {\n"
- " \t\t\t\t#address-cells = <1>;\n"
+ " int __init efi_config_parse_tables(const efi_config_table_t *config_tables,\n"
  "-- \n"
  2.51.0
 
-8271e7777339b9ce00833af5fbf3ccee8c6d9ea9be0af47dbfca2922139c96dc
+6ad745ed29199237d0667abcde1f0053304111adb28bc1918742473859812e8a

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.