[PATCH v4 5/7] nvme-tcp: Support KeyUpdate

Alistair Francis alistair23 at gmail.com
Wed Oct 22 04:16:19 PDT 2025


On Wed, Oct 22, 2025 at 4:56 PM Hannes Reinecke <hare at suse.de> wrote:
>
> On 10/22/25 06:35, Alistair Francis wrote:
> > On Mon, Oct 20, 2025 at 4:22 PM Hannes Reinecke <hare at suse.de> wrote:
> >>
> >> On 10/17/25 06:23, alistair23 at gmail.com wrote:
> >>> From: Alistair Francis <alistair.francis at wdc.com>
> >>>
> [ .. ]>>> @@ -1723,6 +1763,7 @@ static void nvme_tcp_tls_done(void
> *data, int status, key_serial_t pskid,
> >>>                        ctrl->ctrl.tls_pskid = key_serial(tls_key);
> >>>                key_put(tls_key);
> >>>                queue->tls_err = 0;
> >>> +             queue->user_session_id = user_session_id;
> >>
> >> Hmm. I wonder, do we need to store the generation number somewhere?
> >> Currently the sysfs interface is completely oblivious that a key update
> >> has happened. I really would like to have _some_ indicator there telling
> >> us that a key update had happened, and the generation number would be
> >> ideal here.
> >
> > I don't follow.
> >
> > The TLS layer will report the number of KeyUpdates that have been
> > received. Userspace also knows that a KeyUpdate happened as we call to
> > userspace to handle updating the keys.
> >
> Oh, the tlshd will know that (somehow). But everyone else will not; the
> 'tls_pskid' contents will stay the the same.
> Can we have a sysfs attribute reporting the sequence number of the most
> recent KeyUpdate?

Why do we want to reveal that to userspace though?

Realistically it should just be ~2^64 and it'll should remain the same
number, even after multiple updates

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