Re: [PATCH v3] nvme-auth: Don't propose NVME_AUTH_DHGROUP_NULL with SC_C
From: Christoph Hellwig
Date: Wed Mar 18 2026 - 03:57:24 EST
On Wed, Mar 18, 2026 at 10:46:58AM +1000, alistair23@xxxxxxxxx wrote:
> + idlist[dh_list_offset++] = NVME_AUTH_DHGROUP_6144;
> + idlist[dh_list_offset++] = NVME_AUTH_DHGROUP_8192;
> + data->auth_protocol[0].dhchap.dhlen = dh_list_offset - DH_GID_LIST_OFFSET;
Still an overly long line here.
>
> return size;
> }
> diff --git a/include/linux/nvme.h b/include/linux/nvme.h
> index 655d194f8e72..bd540ef33b63 100644
> --- a/include/linux/nvme.h
> +++ b/include/linux/nvme.h
> @@ -2332,4 +2332,6 @@ enum nvme_pr_change_ptpl {
>
> #define NVME_PR_IGNORE_KEY (1 << 3)
>
> +#define DH_GID_LIST_OFFSET 30
Note that we have a target side patch ("nvmet: auth: validate dhchap id
list lengths") also adding defines related to this, but in a different
place and using different naming:
+#define NVME_AUTH_DHCHAP_MAX_HASH_IDS 30
+#define NVME_AUTH_DHCHAP_MAX_DH_IDS 30
Back in the day we usually did nvme.h patch separately to handle these
kinds of conflicts a little better.
YunJe/Alistair, maybe whoever resends next should split this out,
add all the required values and add a pointer to the spec?