Re: [PATCH v4 4/4] nvme: Allow reauth from sysfs

Wilfred Mallawa
2025-12-13T03:33:38Z

On Tue, 2025-12-02 at 15:17 +1000, alistair23@gmail.com wrote:
> From: Alistair Francis <alistair.francis@wdc.com>
>
> Allow userspace to trigger a reauth (REPLACETLSPSK) from sysfs.
> This can be done by writing  a zero to the sysfs file.
>
> echo 0 > /sys/devices/virtual/nvme-
> fabrics/ctl/nvme0/tls_configured_key
>
> In order to use the new keys for the admin queue we call controller
> reset. This isn't ideal, but I can't find a simpler way to reset the
> admin queue TLS connection.
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> v4:
>  - Forcefully reset the connection
> v3:
>  - Only trigger if a 0 is written to `tls_configured_key`
>  - Add documentation
> v2:
>  - Trigger on any value written to `tls_configured_key`
>
>  Documentation/ABI/testing/sysfs-nvme | 13 ++++++++
>  drivers/nvme/host/sysfs.c            | 44
> +++++++++++++++++++++++++++-
>  2 files changed, 56 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/ABI/testing/sysfs-nvme
>
> diff --git a/Documentation/ABI/testing/sysfs-nvme
> b/Documentation/ABI/testing/sysfs-nvme
> new file mode 100644
> index 000000000000..16aaf0dca9e2
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-nvme
> @@ -0,0 +1,13 @@
> +What: /sys/devices/virtual/nvme-
> fabrics/ctl/.../tls_configured_key
> +Date: November 2025
> +KernelVersion: 6.19
> +Contact: Linux NVMe mailing list
> <linux-nvme@lists.infradead.org>
> +Description:
> + The file is avaliable when using a secure
> concatanation
> + connection to a NVMe taget. Reading the file will
> returns

s/a NVMe taget/an NVMe target
s/returns/return

Otherwise LGTM

Reviewed-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>

Wilfred