Skip to content

PCI endpoint additional pci_epc_set_bar() checks

Niklas Cassel linux-pci stable 6 versions – Applied

Status from this message: Applied to endpoint, thank you!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest6 patches 1 replyApplied
  2. v56 patches 7 repliesSuperseded
  3. v45 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v34 patches0 repliesSuperseded
v23 patches2 repliesSuperseded
v13 patches4 repliesSuperseded

Changes in v6 from the cover letter

-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.

Patches in v6 Applied

#Subject and filesSizeRepliesApplied
1/6PCI: dwc: ep: Write BAR_MASK before iATU registers in pci_epc_set_bar()drivers/pci/controller/dwc/pcie-designware-ep.c+15 -130 replies
2/6PCI: dwc: ep: Prevent changing BAR size/flags in pci_epc_set_bar()drivers/pci/controller/dwc/pcie-designware-ep.c+21 -10 replies
3/6PCI: dwc: ep: Add 'address' alignment to 'size' check in dw_pcie_prog_ep_inbound_atu()drivers/pci/controller/dwc/pcie-designware-ep.c drivers/pci/controller/dwc/pcie-designware.c drivers/pci/controller/dwc/pcie-designware.h+9 -60 replies
4/6PCI: artpec6: Implement dw_pcie_ep operation get_featuresdrivers/pci/controller/dwc/pcie-artpec6.c+13 -00 replies
5/6PCI: endpoint: Add size check for fixed size BARs in pci_epc_set_bar()drivers/pci/endpoint/pci-epc-core.c+9 -20 replies
6/6PCI: endpoint: Verify that requested BAR size is a power of twodrivers/pci/endpoint/pci-epc-core.c+3 -00 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchManivannan SadhasivamFrank LiJesper Nilsson
1/6R-b
2/6R-b
3/6R-b
4/6R-b R-b A-b
5/6R-b R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/6] PCI endpoint additional pci_epc_set_bar() checks

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(-)
Signature · 1 line
2.47.1