[PATCH v5 0/9] nvme-auth: switch to use the kernel keyring
Hannes Reinecke
hare at suse.de
Mon Nov 23 07:39:49 PST 2026
On 11/23/26 1:59 PM, Martin Belanger wrote:
>
>
> On 11/23/26 07:14, Hannes Reinecke wrote:
>> With this I have updated the dhchap arguments to 'nvme connect' and
>> the configfs interface to either be the keydata (ie the original
>> interface) _or_ a key description referring to a pre-populated dhchap
>> key in the kernel keyring.
>
> Hi Hannes,
>
> How should nvme-cli determine whether the kernel accepts a key
> description for DH-HMAC-CHAP?
>
> I will add DH-HMAC-CHAP support to nvme-keysd. It will import the
> secrets into the .nvme keyring, the same way it imports TLS PSKs
> today, and nvme-cli will pass the key description to 'nvme connect'.
> On an older kernel, nvme-keysd must not import the secrets, and
> nvme-cli must pass the key data instead. So both need to know what
> the kernel supports.
>
> I see these options:
>
> 1. Check the kernel version. This does not cover backports.
>
> 2. Use a separate option for the key description, for example
> dhchap_key=%s and dhchap_ctrl_key=%s. nvme-cli would then detect
> support through /dev/nvme-fabrics, as it does for the other
> options. It also avoids having one string that can mean either a
> description or key data.
>
> 3. Something else. add_key() fails with ENODEV when the 'dhchap' key
> type does not exist, but this does not show that the connect
> options accept a description.
>
I think option 2) is the easiest. We already have support for that
selection mechanism in nvme-cli, and anyone backporting only parts
of this series deserves no better.
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