diff options
author | Dan Williams <dan.j.williams@intel.com> | 2021-09-03 19:20:45 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-09-12 09:01:00 +0200 |
commit | 30732043855fe55d464de148159259d7dc7b28df (patch) | |
tree | d35c4b9537a673950bfedaaa590c21de8917ea8d | |
parent | 50cfd0a582e7686e95e10f4f3621e068a4e8dfca (diff) |
cxl/pci: Fix lockdown level
commit 9e56614c44b994b78fc9fcb2070bcbe3f5df0d7b upstream.
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: 13237183c735 ("cxl/mem: Add a "RAW" send command")
Cc: Ben Widawsky <ben.widawsky@intel.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: <stable@vger.kernel.org>
Cc: Ondrej Mosnacek <omosnace@redhat.com>
Cc: Paul Moore <paul@paul-moore.com>
Link: https://lore.kernel.org/r/163072204525.2250120.16615792476976546735.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/cxl/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cxl/pci.c b/drivers/cxl/pci.c index c446b30032a7..145ad4bc305f 100644 --- a/drivers/cxl/pci.c +++ b/drivers/cxl/pci.c @@ -568,7 +568,7 @@ static bool cxl_mem_raw_command_allowed(u16 opcode) if (!IS_ENABLED(CONFIG_CXL_MEM_RAW_COMMANDS)) return false; - if (security_locked_down(LOCKDOWN_NONE)) + if (security_locked_down(LOCKDOWN_PCI_ACCESS)) return false; if (cxl_raw_allow_all) |