From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: <alison.schofield@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Ben Widawsky <bwidawsk@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>, <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v13 2/9] cxl/mbox: Restrict poison cmds to debugfs cxl_raw_allow_all
Date: Sun, 23 Apr 2023 16:23:38 +0100 [thread overview]
Message-ID: <20230423162338.00007ddb@huawei.com> (raw)
In-Reply-To: <0e5cb41ffae2bab800957d3b9003eedfd0a2dfd5.1681838291.git.alison.schofield@intel.com>
On Tue, 18 Apr 2023 10:39:02 -0700
alison.schofield@intel.com wrote:
> From: Alison Schofield <alison.schofield@intel.com>
>
> 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>
Makes sense. I see Dan already has these queued in cxl pending so
don't mind if tags get added or not. I'm only looking again as I was
testing the latest version of the qemu emulation of poison handling.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
> drivers/cxl/core/mbox.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
> index 938cff2c948e..fd1026970d3a 100644
> --- a/drivers/cxl/core/mbox.c
> +++ b/drivers/cxl/core/mbox.c
> @@ -82,6 +82,9 @@ static struct cxl_mem_command cxl_mem_commands[CXL_MEM_COMMAND_ID_MAX] = {
> *
> * CXL_MBOX_OP_[GET_]SCAN_MEDIA: The kernel provides a native error list that
> * is kept up to date with patrol notifications and error management.
> + *
> + * CXL_MBOX_OP_[GET_,INJECT_,CLEAR_]POISON: These commands require kernel
> + * driver orchestration for safety.
> */
> static u16 cxl_disabled_raw_commands[] = {
> CXL_MBOX_OP_ACTIVATE_FW,
> @@ -90,6 +93,9 @@ static u16 cxl_disabled_raw_commands[] = {
> CXL_MBOX_OP_SET_SHUTDOWN_STATE,
> CXL_MBOX_OP_SCAN_MEDIA,
> CXL_MBOX_OP_GET_SCAN_MEDIA,
> + CXL_MBOX_OP_GET_POISON,
> + CXL_MBOX_OP_INJECT_POISON,
> + CXL_MBOX_OP_CLEAR_POISON,
> };
>
> /*
next prev parent reply other threads:[~2023-04-23 15:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 17:39 [PATCH v13 0/9] CXL Poison List Retrieval & Tracing alison.schofield
2023-04-18 17:39 ` [PATCH v13 1/9] cxl/mbox: Deprecate poison commands alison.schofield
2023-04-18 17:39 ` [PATCH v13 2/9] cxl/mbox: Restrict poison cmds to debugfs cxl_raw_allow_all alison.schofield
2023-04-23 15:23 ` Jonathan Cameron [this message]
2023-04-18 17:39 ` [PATCH v13 3/9] cxl/mbox: Initialize the poison state alison.schofield
2023-04-22 3:22 ` Dan Williams
2023-04-23 15:28 ` Jonathan Cameron
2023-04-18 17:39 ` [PATCH v13 4/9] cxl/mbox: Add GET_POISON_LIST mailbox command alison.schofield
2023-04-18 17:39 ` [PATCH v13 5/9] cxl/trace: Add TRACE support for CXL media-error records alison.schofield
2023-04-18 17:39 ` [PATCH v13 6/9] cxl/memdev: Add trigger_poison_list sysfs attribute alison.schofield
2023-04-26 2:38 ` Davidlohr Bueso
2023-04-27 4:11 ` Alison Schofield
2023-04-27 15:39 ` Davidlohr Bueso
2023-04-27 16:35 ` Dan Williams
2023-04-27 19:18 ` Alison Schofield
2023-04-27 19:54 ` Dan Williams
2023-04-27 21:35 ` Alison Schofield
2023-04-18 17:39 ` [PATCH v13 7/9] cxl/region: Provide region info to the cxl_poison trace event alison.schofield
2023-04-22 21:36 ` Dan Williams
2023-04-18 17:39 ` [PATCH v13 8/9] cxl/trace: Add an HPA to cxl_poison trace events alison.schofield
2023-04-18 17:39 ` [PATCH v13 9/9] tools/testing/cxl: Mock support for Get Poison List alison.schofield
2023-04-23 15:30 ` [PATCH v13 0/9] CXL Poison List Retrieval & Tracing Jonathan Cameron
2023-04-23 15:41 ` Jonathan Cameron
2023-04-23 18:47 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230423162338.00007ddb@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox