[PATCH 3/3] nvme: Allow reauth from sysfs

Alistair Francis alistair23 at gmail.com
Tue Nov 11 15:32:00 PST 2025


On Mon, Nov 3, 2025 at 10:08 PM Hannes Reinecke <hare at suse.de> wrote:
>
> 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.

I think the `tls_configured_key` is actually the better attribute to
write to as that is the one that updates after a REPLACETLSPSK
operation, see v2 patches which I'm sending now.

Alistair

>
> 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