From: Hannes Reinecke <hare@suse.de>
To: Martin Belanger <martin.nvme.dev@gmail.com>,
Eric Biggers <ebiggers@kernel.org>
Cc: Hannes Reinecke <hare@kernel.org>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <kch@nvidia.com>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
keyrings@vger.kernel.org
Subject: Re: [PATCH v6 0/9] nvme-auth: switch to use the kernel keyring
Date: Wed, 25 Nov 2026 08:26:35 +0100 [thread overview]
Message-ID: <561e1abd-2430-4808-af99-cbdd3fd86d31@suse.de> (raw)
In-Reply-To: <c2163003-948c-49fa-815e-b1f91814a80a@gmail.com>
Hey all,
On 11/24/26 11:13 PM, Martin Belanger wrote:
>
>
> 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.
>
Ah. So essentially you are saying I should drop the patch 'nvme:
parse dhchap keys during option parsing' and keep the
secret/key description in struct nvmf_ctrl_options?
Sure one could do that; but again the main push behind this
patchset was to precisely _not_ to have to store them in
any structure, but rather work with the keystore and only
access the key data once they are actually needed.
And the other problem with your approach is that DH-CHAP
key don't actually have 'names'; they are just binary blobs.
If we want to refer to them by name we first would need to
agree on what the name actually _is_.
What we could do is to store the key serial in struct
nvmf_ctrl_options; that would allow keysd to provision
the keys and rotate them via 'keyctl update' (or whatever
it's doing internally). And would get away from the
business of having to come up with a name for the key.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@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
prev parent reply other threads:[~2026-11-25 7:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 17:10 Hannes Reinecke
2026-11-23 17:10 ` [PATCH v6 1/9] nvme-auth: modify nvme_auth_transform_key() to return status Hannes Reinecke
2026-11-23 17:10 ` [PATCH v6 2/9] nvme-keyring: add 'dhchap' key type Hannes Reinecke
2026-11-23 17:10 ` [PATCH v6 3/9] nvme-auth: switch to use 'struct key' Hannes Reinecke
2026-11-23 17:10 ` [PATCH v6 4/9] nvme: parse dhchap keys during option parsing Hannes Reinecke
2026-11-23 17:10 ` [PATCH v6 5/9] nvmet-auth: parse dhchap key from configfs attribute Hannes Reinecke
2026-11-23 17:10 ` [PATCH v6 6/9] nvme: allow to pass in key description as dhchap secret Hannes Reinecke
2026-11-23 17:10 ` [PATCH v6 7/9] nvme-auth: wait for authentication to finish when changing keys Hannes Reinecke
2026-11-23 17:10 ` [PATCH v6 8/9] nvme-fabrics: allow to pass in keyring by name Hannes Reinecke
2026-11-23 17:10 ` [PATCH v6 9/9] nvmet: add configfs attribute 'dhchap_keyring' Hannes Reinecke
2026-11-23 21:21 ` [PATCH v6 0/9] nvme-auth: switch to use the kernel keyring Eric Biggers
2026-11-24 10:30 ` Hannes Reinecke
2026-11-24 20:11 ` Eric Biggers
2026-11-24 20:50 ` Martin Belanger
2026-11-24 21:32 ` Eric Biggers
2026-11-24 22:13 ` Martin Belanger
2026-11-25 7:26 ` Hannes Reinecke [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=561e1abd-2430-4808-af99-cbdd3fd86d31@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=ebiggers@kernel.org \
--cc=hare@kernel.org \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=kch@nvidia.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=martin.nvme.dev@gmail.com \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®