[PATCH v4 0/4] Miscellaneous fixes for pci subsystem

Ziming Du posted 4 patches 3 weeks, 2 days ago
drivers/pci/pci-sysfs.c |  7 +++++++
drivers/pci/proc.c      | 11 +++++++++--
2 files changed, 16 insertions(+), 2 deletions(-)
[PATCH v4 0/4] Miscellaneous fixes for pci subsystem
Posted by Ziming Du 3 weeks, 2 days ago
Miscellaneous fixes for pci subsystem

Changes in v4:
- Remove the architecture-specific #ifdef to apply the alignment
  check for all platforms (including x86), as device registers are
  naturally aligned anyway.
- Fix a potential issue in proc_bus_pci_read() to make it consistent
  with proc_bus_pci_write(), as suggested by Ilpo Järvinen.
- Link to v3: https://lore.kernel.org/linux-pci/20260108015944.3520719-1-duziming2@huawei.com/

Changes in v3:
- Check *ppos before assign it to pos.
- Link to v2: https://lore.kernel.org/linux-pci/20251224092721.2034529-1-duziming2@huawei.com/

Changes in v2:
- Correct grammer and indentation.
- Remove unrelated stack traces from the commit message.
- Modify the handling of pos by adding a non-negative check to ensure
  that the input value is valid.
- Use the existing IS_ALIGNED macro and ensure that after modification,
  other cases still retuen -EINVAL as before.
- Link to v1: https://lore.kernel.org/linux-pci/20251216083912.758219-1-duziming2@huawei.com/

Yongqiang Liu (2):
  PCI: Prevent overflow in proc_bus_pci_write()
  PCI/sysfs: Prohibit unaligned access to I/O port
Ziming Du (2):
  PCI/sysfs: Fix null pointer dereference during hotplug
  PCI: Prevent overflow in proc_bus_pci_read()

 drivers/pci/pci-sysfs.c |  7 +++++++
 drivers/pci/proc.c      | 11 +++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

-- 
2.43.0

Re: [PATCH v4 0/4] Miscellaneous fixes for pci subsystem
Posted by duziming 1 week, 2 days ago
Hi all,

Gentle ping on this patchset. Any feedback would be greatly appreciated.

On 2026/1/15 15:52, Ziming Du wrote:

> Miscellaneous fixes for pci subsystem
>
> Changes in v4:
> - Remove the architecture-specific #ifdef to apply the alignment
>    check for all platforms (including x86), as device registers are
>    naturally aligned anyway.
> - Fix a potential issue in proc_bus_pci_read() to make it consistent
>    with proc_bus_pci_write(), as suggested by Ilpo Järvinen.
> - Link to v3:https://lore.kernel.org/linux-pci/20260108015944.3520719-1-duziming2@huawei.com/
>
> Changes in v3:
> - Check *ppos before assign it to pos.
> - Link to v2:https://lore.kernel.org/linux-pci/20251224092721.2034529-1-duziming2@huawei.com/
>
> Changes in v2:
> - Correct grammer and indentation.
> - Remove unrelated stack traces from the commit message.
> - Modify the handling of pos by adding a non-negative check to ensure
>    that the input value is valid.
> - Use the existing IS_ALIGNED macro and ensure that after modification,
>    other cases still retuen -EINVAL as before.
> - Link to v1:https://lore.kernel.org/linux-pci/20251216083912.758219-1-duziming2@huawei.com/
>
> Yongqiang Liu (2):
>    PCI: Prevent overflow in proc_bus_pci_write()
>    PCI/sysfs: Prohibit unaligned access to I/O port
> Ziming Du (2):
>    PCI/sysfs: Fix null pointer dereference during hotplug
>    PCI: Prevent overflow in proc_bus_pci_read()
>
>   drivers/pci/pci-sysfs.c |  7 +++++++
>   drivers/pci/proc.c      | 11 +++++++++--
>   2 files changed, 16 insertions(+), 2 deletions(-)

Thanx du!

Re: [PATCH v4 0/4] Miscellaneous fixes for pci subsystem
Posted by Bjorn Helgaas 1 day, 21 hours ago
On Fri, Jan 30, 2026 at 03:53:10PM +0800, duziming wrote:
> Hi all,
> 
> Gentle ping on this patchset. Any feedback would be greatly appreciated.

Sorry I didn't get to this.  Poke again after v6.20-rc1.

> On 2026/1/15 15:52, Ziming Du wrote:
> 
> > Miscellaneous fixes for pci subsystem
> > 
> > Changes in v4:
> > - Remove the architecture-specific #ifdef to apply the alignment
> >    check for all platforms (including x86), as device registers are
> >    naturally aligned anyway.
> > - Fix a potential issue in proc_bus_pci_read() to make it consistent
> >    with proc_bus_pci_write(), as suggested by Ilpo Järvinen.
> > - Link to v3:https://lore.kernel.org/linux-pci/20260108015944.3520719-1-duziming2@huawei.com/
> > 
> > Changes in v3:
> > - Check *ppos before assign it to pos.
> > - Link to v2:https://lore.kernel.org/linux-pci/20251224092721.2034529-1-duziming2@huawei.com/
> > 
> > Changes in v2:
> > - Correct grammer and indentation.
> > - Remove unrelated stack traces from the commit message.
> > - Modify the handling of pos by adding a non-negative check to ensure
> >    that the input value is valid.
> > - Use the existing IS_ALIGNED macro and ensure that after modification,
> >    other cases still retuen -EINVAL as before.
> > - Link to v1:https://lore.kernel.org/linux-pci/20251216083912.758219-1-duziming2@huawei.com/
> > 
> > Yongqiang Liu (2):
> >    PCI: Prevent overflow in proc_bus_pci_write()
> >    PCI/sysfs: Prohibit unaligned access to I/O port
> > Ziming Du (2):
> >    PCI/sysfs: Fix null pointer dereference during hotplug
> >    PCI: Prevent overflow in proc_bus_pci_read()
> > 
> >   drivers/pci/pci-sysfs.c |  7 +++++++
> >   drivers/pci/proc.c      | 11 +++++++++--
> >   2 files changed, 16 insertions(+), 2 deletions(-)
> 
> Thanx du!
>