Skip to content

Commit dec441d

Browse files
AlisonSchofielddjbw
authored andcommitted
cxl/mbox: Restrict poison cmds to debugfs cxl_raw_allow_all
The Get, Inject, and Clear poison commands are not available for direct user access because they require kernel driver controls to perform safely. Further restrict access to these commands by requiring the selection of the debugfs attribute 'cxl_raw_allow_all' to enable in raw mode. Signed-off-by: Alison Schofield <alison.schofield@intel.com> Link: https://lore.kernel.org/r/0e5cb41ffae2bab800957d3b9003eedfd0a2dfd5.1681838291.git.alison.schofield@intel.com Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Tested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 3db166d commit dec441d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/cxl/core/mbox.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ static struct cxl_mem_command cxl_mem_commands[CXL_MEM_COMMAND_ID_MAX] = {
8282
*
8383
* CXL_MBOX_OP_[GET_]SCAN_MEDIA: The kernel provides a native error list that
8484
* is kept up to date with patrol notifications and error management.
85+
*
86+
* CXL_MBOX_OP_[GET_,INJECT_,CLEAR_]POISON: These commands require kernel
87+
* driver orchestration for safety.
8588
*/
8689
static u16 cxl_disabled_raw_commands[] = {
8790
CXL_MBOX_OP_ACTIVATE_FW,
@@ -90,6 +93,9 @@ static u16 cxl_disabled_raw_commands[] = {
9093
CXL_MBOX_OP_SET_SHUTDOWN_STATE,
9194
CXL_MBOX_OP_SCAN_MEDIA,
9295
CXL_MBOX_OP_GET_SCAN_MEDIA,
96+
CXL_MBOX_OP_GET_POISON,
97+
CXL_MBOX_OP_INJECT_POISON,
98+
CXL_MBOX_OP_CLEAR_POISON,
9399
};
94100

95101
/*

0 commit comments

Comments
 (0)