From: Alison Schofield <alison.schofield@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: <linux-cxl@vger.kernel.org>, <dave@stgolabs.net>,
<jic23@kernel.org>, <vishal.l.verma@intel.com>, <djbw@kernel.org>,
<icheng@nvidia.com>
Subject: Re: [PATCH] cxl: Deny Features commands on the RAW mailbox path
Date: Wed, 15 Jul 2026 08:58:58 -0700 [thread overview]
Message-ID: <aleuQp265bt7DRTd@aschofie-mobl2.lan> (raw)
In-Reply-To: <20260715155126.1629178-1-dave.jiang@intel.com>
On Wed, Jul 15, 2026 at 08:51:26AM -0700, Dave Jiang wrote:
> The RAW mailbox command path allows user to issue arbitrary opcodes
> to the device. The FWCTL interface was introduced to support the
> CXL Features commands where access control is provided depends on
> what the CEL indicates.
>
> Add the Features commands to cxl_disabled_raw_commands[] to ensure
> that all Features commands are only accessible through the FWCTL
> interface.
>
> The cxl_raw_allow_all debugfs override knob bypasses the disabled list
> if the user is aware of the risks and wants to use the RAW path for
> Features commands.
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/cxl/core/mbox.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
> index 7c6c5b7450a5..6dea70a1ff95 100644
> --- a/drivers/cxl/core/mbox.c
> +++ b/drivers/cxl/core/mbox.c
> @@ -91,6 +91,10 @@ static struct cxl_mem_command cxl_mem_commands[CXL_MEM_COMMAND_ID_MAX] = {
> *
> * CXL_MBOX_OP_[GET_,INJECT_,CLEAR_]POISON: These commands require kernel
> * driver orchestration for safety.
> + *
> + * CXL_MBOX_OP_[GET_SUPPORTED_FEATURES,GET_FEATURE,SET_FEATURE]: Features are
> + * accessed through the fwctl ABI, which applies scope-based access control.
> + * The RAW path would bypass those checks, so it is not permitted here.
> */
> static u16 cxl_disabled_raw_commands[] = {
> CXL_MBOX_OP_ACTIVATE_FW,
> @@ -102,6 +106,9 @@ static u16 cxl_disabled_raw_commands[] = {
> CXL_MBOX_OP_GET_POISON,
> CXL_MBOX_OP_INJECT_POISON,
> CXL_MBOX_OP_CLEAR_POISON,
> + CXL_MBOX_OP_GET_SUPPORTED_FEATURES,
> + CXL_MBOX_OP_GET_FEATURE,
> + CXL_MBOX_OP_SET_FEATURE,
> };
>
> /*
>
> base-commit: a13c140cc289c0b7b3770bce5b3ad42ab35074aa
> --
> 2.55.0
>
next prev parent reply other threads:[~2026-07-15 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 15:51 [PATCH] cxl: Deny Features commands on the RAW mailbox path Dave Jiang
2026-07-15 15:58 ` Alison Schofield [this message]
2026-07-24 19:13 ` Dave Jiang
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=aleuQp265bt7DRTd@aschofie-mobl2.lan \
--to=alison.schofield@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=djbw@kernel.org \
--cc=icheng@nvidia.com \
--cc=jic23@kernel.org \
--cc=linux-cxl@vger.kernel.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