Skip to content

Commit 9e56614

Browse files
committed
cxl/pci: Fix lockdown level
A proposed rework of security_locked_down() users identified that the cxl_pci driver was passing the wrong lockdown_reason. Update cxl_mem_raw_command_allowed() to fail raw command access when raw pci access is also disabled. Fixes: 1323718 ("cxl/mem: Add a "RAW" send command") Cc: Ben Widawsky <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: <[email protected]> Cc: Ondrej Mosnacek <[email protected]> Cc: Paul Moore <[email protected]> Link: https://lore.kernel.org/r/163072204525.2250120.16615792476976546735.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <[email protected]>
1 parent a7bfaad commit 9e56614

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cxl/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ static bool cxl_mem_raw_command_allowed(u16 opcode)
575575
if (!IS_ENABLED(CONFIG_CXL_MEM_RAW_COMMANDS))
576576
return false;
577577

578-
if (security_locked_down(LOCKDOWN_NONE))
578+
if (security_locked_down(LOCKDOWN_PCI_ACCESS))
579579
return false;
580580

581581
if (cxl_raw_allow_all)

0 commit comments

Comments
 (0)