Skip to content

misc: pci_endpoint_test: doorbell BAR validation fixes

Carlos Bilbao (Lambda) linux-pci lkml 2 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Patch 1: extend bounds check to also reject NO_BAR (-1), which is the Use %d (not %u) in the error message.
- Patch 2: no code change; add Reviewed-by tag.

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2misc: pci_endpoint_test: validate BAR index in doorbell testdrivers/misc/pci_endpoint_test.c+5 -00 replies
2/2misc: pci_endpoint_test: remove dead BAR read before doorbell triggerdrivers/misc/pci_endpoint_test.c+0 -10 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchKoichiro Den
1/2
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] misc: pci_endpoint_test: doorbell BAR validation fixes

From: Carlos Bilbao <[email protected]>

pci_endpoint_test_doorbell() reads a BAR number from endpoint MMIO and uses it as an array index into test->bar[]. Add a defensive bounds check covering both out-of-range positive values and NO_BAR (-1), and remove a dead register read that precedes the writel sequence.

Changes since v1:

- Patch 1: extend bounds check to also reject NO_BAR (-1), which is the Use %d (not %u) in the error message.
- Patch 2: no code change; add Reviewed-by tag.

Carlos Bilbao (2):
misc: pci_endpoint_test: validate BAR index in doorbell test
misc: pci_endpoint_test: remove dead BAR read before doorbell trigger

 drivers/misc/pci_endpoint_test.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0