public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/6] PCI endpoint additional pci_epc_set_bar() checks
@ 2024-12-13 14:33 Niklas Cassel
  2024-12-13 14:33 ` [PATCH v6 1/6] PCI: dwc: ep: Write BAR_MASK before iATU registers in pci_epc_set_bar() Niklas Cassel
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Niklas Cassel @ 2024-12-13 14:33 UTC (permalink / raw)
  To: Jesper Nilsson, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas, Jingoo Han,
	Kishon Vijay Abraham I, Jon Mason, Frank Li
  Cc: Damien Le Moal, Niklas Cassel, linux-arm-kernel, linux-pci

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


Changes since v5:
-Picked up tags.
-Add Cc: stable for patch 2/6.
-Improved commit messages in patch 1/6 and patch 2/6.
-Improved code comment in patch 2/6 to be more specific.

Niklas Cassel (6):
  PCI: dwc: ep: Write BAR_MASK before iATU registers in
    pci_epc_set_bar()
  PCI: dwc: ep: Prevent changing BAR size/flags in pci_epc_set_bar()
  PCI: dwc: ep: Add 'address' alignment to 'size' check in
    dw_pcie_prog_ep_inbound_atu()
  PCI: artpec6: Implement dw_pcie_ep operation get_features
  PCI: endpoint: Add size check for fixed size BARs in pci_epc_set_bar()
  PCI: endpoint: Verify that requested BAR size is a power of two

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

-- 
2.47.1


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

end of thread, other threads:[~2024-12-18 23:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13 14:33 [PATCH v6 0/6] PCI endpoint additional pci_epc_set_bar() checks Niklas Cassel
2024-12-13 14:33 ` [PATCH v6 1/6] PCI: dwc: ep: Write BAR_MASK before iATU registers in pci_epc_set_bar() Niklas Cassel
2024-12-13 14:33 ` [PATCH v6 2/6] PCI: dwc: ep: Prevent changing BAR size/flags " Niklas Cassel
2024-12-13 14:33 ` [PATCH v6 3/6] PCI: dwc: ep: Add 'address' alignment to 'size' check in dw_pcie_prog_ep_inbound_atu() Niklas Cassel
2024-12-13 14:33 ` [PATCH v6 4/6] PCI: artpec6: Implement dw_pcie_ep operation get_features Niklas Cassel
2024-12-13 14:33 ` [PATCH v6 5/6] PCI: endpoint: Add size check for fixed size BARs in pci_epc_set_bar() Niklas Cassel
2024-12-13 14:33 ` [PATCH v6 6/6] PCI: endpoint: Verify that requested BAR size is a power of two Niklas Cassel
2024-12-18 23:55 ` [PATCH v6 0/6] PCI endpoint additional pci_epc_set_bar() checks Krzysztof Wilczyński

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