Linux GPIO subsystem development
 help / color / mirror / Atom feed
* [PATCH v6 0/2] gpiolib: acpi: Add robust bounds-checking and safe address handling
@ 2026-06-10 15:42 Marco Scardovi
  2026-06-10 15:42 ` [PATCH v6 1/2] gpiolib: acpi: Add robust bounds-checking for GPIO pin resources Marco Scardovi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marco Scardovi @ 2026-06-10 15:42 UTC (permalink / raw)
  To: Mika Westerberg, Andy Shevchenko, Linus Walleij,
	Bartosz Golaszewski
  Cc: linux-gpio, linux-acpi, linux-kernel

Hi all,

The series adds explicit bounds checking for GPIO pin accesses and
ensures safe handling of ACPI addresses in OperationRegion handlers,
without referring to truncation or wrap-around behavior, which does
not apply.

Changes in v6:
- Rebased onto next-20260609.
- Corrected commit messages to describe bounds checking and
  safe ACPI GPIO address handling.
- Removed references to truncation or wrap-around behavior.
- No code changes compared to v5.

Changes in v5:
- Changed the types of length and loop counter 'i' to unsigned int in
  acpi_gpio_adr_space_handler() to prevent signedness mismatches.
- Replaced the min() macro in the length calculation with an
  overflow-safe check (bits > agpio->pin_table_length - pin_index)
  to prevent integer overflow.
- See v5 series at:
  https://lore.kernel.org/linux-gpio/20260602113529.52570-1-scardracs@disroot.org/

Changes in v4:
- Dropped the connection resource leak fix to keep the series focused
  strictly on bounds-checking and address validation.
- See v4 series at:
  https://lore.kernel.org/linux-gpio/20260531120816.17255-1-scardracs@disroot.org/

Changes in v3:
- Fixed a global over-cleanup bug in the error path of the OpRegion
  handler.
- See v3 series at:
  https://lore.kernel.org/linux-gpio/20260520074955.55443-1-mscardovi95@gmail.com/

Changes in v2:
- Split the original single patch into two distinct patches: one for
  bounds checking in the event/wakeup path, and one for safe
  handling of ACPI addresses.
- See v2 series at:
  https://lore.kernel.org/linux-gpio/20260519070039.9280-1-mscardovi95@gmail.com/

Changes in v1:
- Initial submission of the refactored, hardened, and modularized
  ACPI GPIO core.
- See v1 series at:
  https://lore.kernel.org/linux-gpio/20260518075357.112584-1-mscardovi95@gmail.com/

Marco Scardovi (2):
  gpiolib: acpi: Add robust bounds-checking for GPIO pin resources
  gpiolib: acpi: Prevent out-of-bounds pin access in OperationRegion
    handler

 drivers/gpio/gpiolib-acpi-core.c | 38 +++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 8 deletions(-)

-- 
2.54.0


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

end of thread, other threads:[~2026-06-12  8:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 15:42 [PATCH v6 0/2] gpiolib: acpi: Add robust bounds-checking and safe address handling Marco Scardovi
2026-06-10 15:42 ` [PATCH v6 1/2] gpiolib: acpi: Add robust bounds-checking for GPIO pin resources Marco Scardovi
2026-06-10 15:42 ` [PATCH v6 2/2] gpiolib: acpi: Prevent out-of-bounds pin access in OperationRegion handler Marco Scardovi
2026-06-12  8:52 ` [PATCH v6 0/2] gpiolib: acpi: Add robust bounds-checking and safe address handling Mika Westerberg

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