[PATCH 3/3] nvme: Allow reauth from sysfs
Hannes Reinecke
hare at suse.de
Mon Nov 3 04:08:06 PST 2025
On 10/30/25 04:51, alistair23 at gmail.com wrote:
> From: Alistair Francis <alistair.francis at wdc.com>
>
> Allow userspace to trigger a reauth (REPLACETLSPSK) from sysfs.
> This can be done by writing the queue ID to te sysfs file.
>
> echo 0 > /sys/devices/virtual/nvme-fabrics/ctl/nvme0/replace_psk
>
> Note that only QID 0 (admin queue) is supported.
>
> Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
> ---
> drivers/nvme/host/sysfs.c | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
Please, don't. Currently we are using the same key for all queues,
and we really should keep it that way as we don't have a way of
specifying the key based on the queue ID (the TLS identification
is identical for all queues).
So we really need to trigger a replacepsk operation for all queues.
I would suggest just allow writes to the 'tls_key' attribute; any
writes to that would trigger a replacepsk operation.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list