Skip to content

CXL: Taint user access to DOE mailbox config space

[email protected] linux-cxl linux-pci lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesIn review
  2. v22 patches 6 repliesSuperseded
  3. v12 patches 6 repliesSuperseded

Changes in v3 from the cover letter

Incorporate feedback from Greg and Jonathan

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2PCI: Allow drivers to request exclusive config regionsdrivers/pci/pci-sysfs.c drivers/pci/probe.c include/linux/ioport.h +2 more+40 -52 replies
2/2cxl/doe: Request exclusive DOE accessdrivers/cxl/pci.c include/uapi/linux/pci_regs.h+6 -01 reply

Reviews trailers per patch

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

PatchJonathan CameronGreg Kroah-HartmanBjorn Helgaas
1/2R-b A-b A-b
2/2R-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 v3 thread

Cover letter [PATCH V3 0/2] CXL: Taint user access to DOE mailbox config space

From: Ira Weiny <[email protected]>

Changes from V2
Incorporate feedback from Greg and Jonathan

Changes from V1
Incorporate feedback from Dan and Greg.

PCI config space access from user space has traditionally been unrestricted with writes being an understood risk for device operation.

Unfortunately, device breakage or odd behavior from config writes lacks indicators that can leave driver writers confused when evaluating failures. This is especially true with the new PCIe Data Object Exchange (DOE) mailbox protocol where backdoor shenanigans from user space through things such as vendor defined protocols may affect device operation without complete breakage.

Even though access should not be restricted it would be nice for driver writers to be able to flag critical parts of the config space such that interference from user space can be detected.

Introduce pci_request_config_region_exclusive() and use it in the CXL driver for DOE config space.

Ira Weiny (2):
PCI: Allow drivers to request exclusive config regions cxl/doe: Request exclusive DOE access

 drivers/cxl/pci.c             |  5 +++++
 drivers/pci/pci-sysfs.c       |  7 +++++++
 drivers/pci/probe.c           |  6 ++++++
 include/linux/ioport.h        |  2 ++
 include/linux/pci.h           | 17 +++++++++++++++++
 include/uapi/linux/pci_regs.h |  1 +
 kernel/resource.c             | 13 ++++++++-----
 7 files changed, 46 insertions(+), 5 deletions(-)

base-commit: f76349cf41451c5c42a99f18a9163377e4b364ff

Signature · 1 line
2.37.2