[PATCH 10/11] nvmet-auth: Diffie-Hellman key exchange support
Guenter Roeck
linux at roeck-us.net
Sun Jul 17 09:29:20 PDT 2022
On Mon, Jun 27, 2022 at 11:52:06AM +0200, Hannes Reinecke wrote:
> Implement Diffie-Hellman key exchange using FFDHE groups for NVMe
> In-Band Authentication.
> This patch adds a new host configfs attribute 'dhchap_dhgroup' to
> select the FFDHE group to use.
>
> Signed-off-by: Hannes Reinecke <hare at suse.de>
> Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
> ---
[ ... ]
> +
> +int nvmet_auth_ctrl_exponential(struct nvmet_req *req,
> + u8 *buf, int buf_size)
> +{
> + struct nvmet_ctrl *ctrl = req->sq->ctrl;
> + int ret = 0;
> +
> + if (!ctrl->dh_key) {
> + pr_warn("ctrl %d no DH public key!\n", ctrl->cntlid);
> + return -ENOKEY;
> + }
> + if (buf_size != ctrl->dh_keysize) {
> + pr_warn("ctrl %d DH public key size mismatch, need %lu is %d\n",
> + ctrl->cntlid, ctrl->dh_keysize, buf_size);
This results in :
drivers/nvme/target/auth.c: In function 'nvmet_auth_ctrl_exponential':
include/linux/kern_levels.h:5:25: error:
format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t'
on 32-bit builds.
Guenter
More information about the Linux-nvme
mailing list