mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ACPI: IORT: validate node and RMR extents
@ 2026-08-13 16:01 Pengpeng Hou
  2026-08-13 16:04 ` [PATCH v2 1/2] ACPI: IORT: validate table and node extents before traversal Pengpeng Hou
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pengpeng Hou @ 2026-08-13 16:01 UTC (permalink / raw)
  To: Lorenzo Pieralisi, Hanjun Guo
  Cc: Sudeep Holla, Catalin Marinas, Will Deacon, Rafael J. Wysocki,
	Len Brown, Robin Murphy, Shameer Kolothum, Joerg Roedel,
	linux-acpi, linux-arm-kernel, linux-kernel, Pengpeng Hou

The original patch combined the generic IORT node walk with the
IOMMU-specific RMR descriptor and ID-mapping arrays.  This version
separates those contracts as requested.

Patch 1 validates the root node area, complete node headers and advertised
node lengths in each generic walker.  Patch 2, built only with
CONFIG_IOMMU_API, validates the fixed RMR payload and both arrays before
walking them.

Changes since v1:
https://lore.kernel.org/all/20260706094300.82618-1-pengpeng@iscas.ac.cn/
- split generic traversal from RMR array validation
- validate root node_offset and node_count before pointer construction
- scope RMR helpers with their CONFIG_IOMMU_API users
- document why a zero-count array needs no offset validation

Testing used Linux 3d6d817622b0 plus this series, GCC 13.3 and QEMU
8.2.2 with a Cortex-A57 arm64 CPU model.  A temporary KUnit harness in
iort.c called the actual static validation helpers; the harness is not
part of this series.  The acpi_iort_bounds suite passed both tests,
covering invalid root offsets, truncated node and RMR payload extents,
and out-of-bounds RMR descriptor and ID-mapping arrays.

This did not exercise a platform-provided IORT table through the complete
boot-time discovery path.

Pengpeng Hou (2):
  ACPI: IORT: validate table and node extents before traversal
  ACPI: IORT: validate RMR node array extents

 drivers/acpi/arm64/iort.c | 117 +++++++++++++++++++++++++++++++++++---
 1 file changed, 109 insertions(+), 8 deletions(-)


base-commit: 3d6d817622b0a9721e3cc404df3469171582be13
-- 
2.50.1 (Apple Git-155)


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

end of thread, other threads:[~2026-08-13 18:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-13 16:01 [PATCH v2 0/2] ACPI: IORT: validate node and RMR extents Pengpeng Hou
2026-08-13 16:04 ` [PATCH v2 1/2] ACPI: IORT: validate table and node extents before traversal Pengpeng Hou
2026-08-13 16:05 ` [PATCH v2 2/2] ACPI: IORT: validate RMR node array extents Pengpeng Hou
2026-08-13 18:35 ` [PATCH v2 0/2] ACPI: IORT: validate node and RMR extents Robin Murphy

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

all inboxes | Powered by JetHome®