mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] misc: pci_endpoint_test: doorbell BAR validation fixes
@ 2026-04-10 23:02 Carlos Bilbao (Lambda)
  2026-04-10 23:02 ` [PATCH v2 1/2] misc: pci_endpoint_test: validate BAR index in doorbell test Carlos Bilbao (Lambda)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Carlos Bilbao (Lambda) @ 2026-04-10 23:02 UTC (permalink / raw)
  To: mani, kwilczynski, kishon, den
  Cc: arnd, gregkh, linux-pci, linux-kernel, bilbao, Carlos Bilbao

From: Carlos Bilbao <carlos.bilbao@kernel.org>

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(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-05-01 17:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-10 23:02 [PATCH v2 0/2] misc: pci_endpoint_test: doorbell BAR validation fixes Carlos Bilbao (Lambda)
2026-04-10 23:02 ` [PATCH v2 1/2] misc: pci_endpoint_test: validate BAR index in doorbell test Carlos Bilbao (Lambda)
2026-04-10 23:03 ` [PATCH v2 2/2] misc: pci_endpoint_test: remove dead BAR read before doorbell trigger Carlos Bilbao (Lambda)
2026-05-01 17:05 ` [PATCH v2 0/2] misc: pci_endpoint_test: doorbell BAR validation fixes Manivannan Sadhasivam

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

all inboxes | Powered by JetHome®