Re: [PATCH v6 0/9] nvme-auth: switch to use the kernel keyring
From: Martin Belanger
Date: Tue Nov 24 2026 - 17:13:29 EST
On 11/24/26 16:32, Eric Biggers wrote:
> Even if you actually need runtime key rotation without touching
> configfs/sysfs (why, when nvme-keysd could just write those files
> itself?), this series doesn't actually implement that.
Correct, v6 does not implement it. That is what I am asking for.
Writing sysfs from nvme-keysd would give two mechanisms for the same
key: the keyring for the connect, and sysfs for every change after
that. One mechanism is enough.
It would also make nvme-keysd controller-aware. Today nvme-keysd adds
a key to the keyring and does not know which controllers use it. This
is by design. To write sysfs, it would have to track every controller
and know which key each one uses, also for controllers created later.
A lookup by description at each authentication avoids this. It is
also how NVMe/TCP TLS PSKs already work.
With a lookup at each authentication, the sysfs and configfs
attributes no longer need to carry secrets. For a key from the
keyring, they can hold the key description: a read returns it, and a
write sets the description used at the next authentication. The
secret then stays in the keyring, and changing it needs no write to
sysfs. Raw secrets given on connect keep the current behavior.
Martin