From: Dan Williams <dan.j.williams@intel.com>
To: Davidlohr Bueso <dave@stgolabs.net>, <dan.j.williams@intel.com>
Cc: <dave.jiang@intel.com>, <vishal.l.verma@intel.com>,
<Jonathan.Cameron@huawei.com>, <fan.ni@samsung.com>,
<a.manzanares@samsung.com>, <dave@stgolabs.net>,
<linux-cxl@vger.kernel.org>
Subject: RE: [PATCH 4/7] cxl/mem: Wire up Sanitation support
Date: Sun, 25 Jun 2023 15:34:20 -0700 [thread overview]
Message-ID: <6498c0ec8cc41_8e1782946e@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <20230612181038.14421-5-dave@stgolabs.net>
Davidlohr Bueso wrote:
> Implement support for CXL 3.0 8.2.9.8.5.1 Sanitize. This is done by
> adding a security/sanitize' memdev sysfs file to trigger the operation
> and extend the status file to make it poll(2)-capable for completion.
> Unlike all other background commands, this is the only operation that
> is special and monopolizes the device for long periods of time.
>
> In addition to the traditional pmem security requirements, all regions
> must also be offline in order to perform the operation. This permits
> avoiding explicit global CPU cache management, relying instead on
> attach_target() setting CXL_REGION_F_INCOHERENT upon reconnect.
CXL_REGION_F_INCOHERENT is going away, but the sentiment still holds. I
will update this to:
"This permits avoiding explicit global CPU cache management, relying
instead on the implict cache management when a region transitions
between CXL_CONFIG_ACTIVE and CXL_CONFIG_COMMIT."
>
> The expectation is that userspace can use it such as:
>
> cxl disable-memdev memX
> echo 1 > /sys/bus/cxl/devices/memX/security/sanitize
I assume this will become 'cxl sanitize-memdev' and handle all the busy
reporting etc for the user?
> cxl wait-sanitize memX
> cxl enable-memdev memX
>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> ---
> Documentation/ABI/testing/sysfs-bus-cxl | 21 +++++++-
> drivers/cxl/core/mbox.c | 55 ++++++++++++++++++++
> drivers/cxl/core/memdev.c | 67 +++++++++++++++++++++++++
> drivers/cxl/cxlmem.h | 4 ++
> drivers/cxl/pci.c | 6 +++
> 5 files changed, 151 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-cxl b/Documentation/ABI/testing/sysfs-bus-cxl
> index 721a44d8a482..5753cba98692 100644
> --- a/Documentation/ABI/testing/sysfs-bus-cxl
> +++ b/Documentation/ABI/testing/sysfs-bus-cxl
> @@ -64,8 +64,25 @@ KernelVersion: v6.5
> Contact: linux-cxl@vger.kernel.org
> Description:
> (RO) Reading this file will display the CXL security state for
> - that device. Such states can be: 'disabled', or those available
> - only for persistent memory: 'locked', 'unlocked' or 'frozen'.
> + that device. Such states can be: 'disabled', 'sanitize', when
> + a sanitation is currently underway; or those available only
> + for persistent memory: 'locked', 'unlocked' or 'frozen'. This
> + sysfs entry is select/poll capable from userspace to notify
> + upon completion of a sanitize operation.
> +
> +
> +What: /sys/bus/cxl/devices/memX/security/sanitize
> +Date: June, 2023
> +KernelVersion: v6.5
> +Contact: linux-cxl@vger.kernel.org
> +Description:
> + (WO) Write a boolean 'true' string value to this attribute to
> + sanitize the device to securely re-purpose or decommission it.
> + This is done by ensuring that all user data and meta-data,
> + whether it resides in persistent capacity, volatile capacity,
> + or the LSA, is made permanently unavailable by whatever means
> + is appropriate for the media type. This functionality requires
> + the device to be not be actively decoding any HPA ranges.
I notice this attribute is unconditionally available. It would be nice
to hide it on devices that do not support the optional sanitize command.
This is a minor fixup that just needs to be in place before v6.5-final.
next prev parent reply other threads:[~2023-06-25 22:34 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 18:10 [PATCH v6 0/7] cxl: Support device sanitation Davidlohr Bueso
2023-06-12 18:10 ` [PATCH 1/7] cxl/mbox: Allow for IRQ_NONE case in the isr Davidlohr Bueso
2023-06-13 12:49 ` Jonathan Cameron
2023-06-13 18:11 ` Dave Jiang
2023-06-12 18:10 ` [PATCH 2/7] cxl/mem: Introduce security state sysfs file Davidlohr Bueso
2023-06-13 18:12 ` Dave Jiang
2023-06-12 18:10 ` [PATCH 3/7] cxl/mbox: Add sanitation handling machinery Davidlohr Bueso
2023-06-13 16:07 ` Jonathan Cameron
2023-06-13 16:28 ` Davidlohr Bueso
2023-06-14 8:36 ` Jonathan Cameron
2023-06-25 22:13 ` Dan Williams
2023-06-26 18:17 ` Davidlohr Bueso
2023-06-25 22:18 ` Dan Williams
2023-06-12 18:10 ` [PATCH 4/7] cxl/mem: Wire up Sanitation support Davidlohr Bueso
2023-06-25 22:34 ` Dan Williams [this message]
2023-06-12 18:10 ` [PATCH 5/7] cxl/test: Add Sanitize opcode support Davidlohr Bueso
2023-06-12 18:10 ` [PATCH 6/7] cxl/mem: Support Secure Erase Davidlohr Bueso
2023-06-12 18:10 ` [PATCH 7/7] cxl/test: Add Secure Erase opcode support Davidlohr Bueso
2023-06-13 15:26 ` [PATCH v6 0/7] cxl: Support device sanitation Jonathan Cameron
2023-06-13 15:51 ` Jonathan Cameron
2023-06-13 16:25 ` Davidlohr Bueso
2023-06-25 22:44 ` Dan Williams
2023-06-26 21:32 ` Davidlohr Bueso
2023-06-26 22:47 ` Dan Williams
2023-06-27 8:02 ` [PATCH] cxl/pci: Use correct flag for sanitize polling Davidlohr Bueso
2023-06-27 23:01 ` Dan Williams
-- strict thread matches above, loose matches on Subject: below --
2023-04-21 9:23 [PATCH v4 0/7] cxl: Background cmds and device sanitation Davidlohr Bueso
2023-04-21 9:23 ` [PATCH 4/7] cxl/mem: Wire up Sanitation support Davidlohr Bueso
2023-04-21 20:04 ` kernel test robot
2023-04-21 20:24 ` kernel test robot
2023-05-11 15:07 ` Jonathan Cameron
2023-05-11 17:23 ` Davidlohr Bueso
2023-05-12 17:00 ` Jonathan Cameron
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=6498c0ec8cc41_8e1782946e@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=a.manzanares@samsung.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--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