mbox series

[v2,0/3] PCI endpoint additional pci_epc_set_bar() checks

Message ID 20241115084749.1915915-5-cassel@kernel.org (mailing list archive)
Headers show
Series PCI endpoint additional pci_epc_set_bar() checks | expand

Message

Niklas Cassel Nov. 15, 2024, 8:47 a.m. UTC
Hello all,

This series adds some extra checks to ensure that it is not possible to
program the iATU with an address which we did not intend to use.

If these checks were in place when testing some of the earlier revisions
of Frank's doorbell patches (which did not handle fixed BARs properly),
we would gotten an error, rather than silently using an address which we
did not intend to use.

Having these checks in place will hopefully avoid similar debugging in the
future.


Kind regards,
Niklas

Niklas Cassel (3):
  PCI: artpec6: Implement dw_pcie_ep operation get_features
  PCI: endpoint: Add size check for fixed size BARs in pci_epc_set_bar()
  PCI: dwc: ep: Add 'address' alignment to 'size' check in
    dw_pcie_prog_ep_inbound_atu()

 drivers/pci/controller/dwc/pcie-artpec6.c       | 13 +++++++++++++
 drivers/pci/controller/dwc/pcie-designware-ep.c |  8 +++++---
 drivers/pci/controller/dwc/pcie-designware.c    |  5 +++--
 drivers/pci/controller/dwc/pcie-designware.h    |  2 +-
 drivers/pci/endpoint/pci-epc-core.c             | 11 +++++++++--
 5 files changed, 31 insertions(+), 8 deletions(-)

Comments

Niklas Cassel Nov. 15, 2024, 9:01 a.m. UTC | #1
On Fri, Nov 15, 2024 at 09:47:49AM +0100, Niklas Cassel wrote:
> Hello all,
> 
> This series adds some extra checks to ensure that it is not possible to
> program the iATU with an address which we did not intend to use.
> 
> If these checks were in place when testing some of the earlier revisions
> of Frank's doorbell patches (which did not handle fixed BARs properly),
> we would gotten an error, rather than silently using an address which we
> did not intend to use.
> 
> Having these checks in place will hopefully avoid similar debugging in the
> future.

Changes since v1:
-Improved commit message in patch 3/3.
-Picked up tags.


Kind regards,
Niklas