public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] PCI: Fix procfs PCI config access issues
@ 2026-04-14  2:45 Ziming Du
  2026-04-14  2:45 ` [PATCH 1/4] PCI: Align proc_bus_pci_write() with pci_write_config() Ziming Du
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Ziming Du @ 2026-04-14  2:45 UTC (permalink / raw)
  To: bhelgaas; +Cc: linux-pci, linux-kernel, liuyongqiang13, duziming2

Hi,

As suggested by Bjorn, this series aligns the implementation of procfs with
the sysfs counterpart and fixes procfs PCI configuration access issues.

The first two patches refactor proc_bus_pci_{write,read}() to align
with pci_write_config() and pci_read_config() respectively:
  - Rename variables (pos->off, cnt->count/size) for consistency
  - Remove rebundant bounds check

The last two patches fix potential overflow issues:
  - Prevent overflow when offset exceeds reasonable range
  - Fix implicit 64-bit to 32-bit truncation in read path

Link: https://lore.kernel.org/all/20260303193253.GA3817951@bhelgaas/

Ziming Du (4):
  PCI: Align proc_bus_pci_write() with pci_write_config()
  PCI: Align proc_bus_pci_read() with pci_read_config()
  PCI: Prevent overflow in proc_bus_pci_write()
  PCI: Prevent overflow in proc_bus_pci_read()

 drivers/pci/proc.c | 115 ++++++++++++++++++++++-----------------------
 1 file changed, 57 insertions(+), 58 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-05-03 23:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-14  2:45 [PATCH 0/4] PCI: Fix procfs PCI config access issues Ziming Du
2026-04-14  2:45 ` [PATCH 1/4] PCI: Align proc_bus_pci_write() with pci_write_config() Ziming Du
2026-05-03 23:02   ` Krzysztof Wilczyński
2026-04-14  2:45 ` [PATCH 2/4] PCI: Align proc_bus_pci_read() with pci_read_config() Ziming Du
2026-04-14  2:45 ` [PATCH 3/4] PCI: Prevent overflow in proc_bus_pci_write() Ziming Du
2026-04-14  2:45 ` [PATCH 4/4] PCI: Prevent overflow in proc_bus_pci_read() Ziming Du
2026-05-03 22:38   ` Krzysztof Wilczyński
2026-04-27  2:22 ` [PING] PCI: Fix procfs PCI config access issues duziming
2026-04-27 22:19 ` [PATCH 0/4] " Bjorn Helgaas

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