Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-auth: update bi_directional flag
@ 2025-09-15 11:49 Martin George
  2025-09-15 12:20 ` Hannes Reinecke
  2025-09-15 15:54 ` Keith Busch
  0 siblings, 2 replies; 3+ messages in thread
From: Martin George @ 2025-09-15 11:49 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, kbusch, sagi, hare, Martin George

While setting chap->s2 to zero as part of secure channel
concatenation, the host missed out to disable the bi_directional
flag to indicate that controller authentication is not requested.
Fix the same.

Fixes: e88a7595b57f ("nvme-tcp: request secure channel concatenation")
Signed-off-by: Martin George <marting@netapp.com>
---
 drivers/nvme/host/auth.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
index 201fc8809a62..012fcfc79a73 100644
--- a/drivers/nvme/host/auth.c
+++ b/drivers/nvme/host/auth.c
@@ -331,9 +331,10 @@ static int nvme_auth_set_dhchap_reply_data(struct nvme_ctrl *ctrl,
 	} else {
 		memset(chap->c2, 0, chap->hash_len);
 	}
-	if (ctrl->opts->concat)
+	if (ctrl->opts->concat) {
 		chap->s2 = 0;
-	else
+		chap->bi_directional = false;
+	} else
 		chap->s2 = nvme_auth_get_seqnum();
 	data->seqnum = cpu_to_le32(chap->s2);
 	if (chap->host_key_len) {
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme-auth: update bi_directional flag
  2025-09-15 11:49 [PATCH] nvme-auth: update bi_directional flag Martin George
@ 2025-09-15 12:20 ` Hannes Reinecke
  2025-09-15 15:54 ` Keith Busch
  1 sibling, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2025-09-15 12:20 UTC (permalink / raw)
  To: Martin George, linux-nvme; +Cc: hch, kbusch, sagi, hare, Martin George

On 9/15/25 13:49, Martin George wrote:
> While setting chap->s2 to zero as part of secure channel
> concatenation, the host missed out to disable the bi_directional
> flag to indicate that controller authentication is not requested.
> Fix the same.
> 
> Fixes: e88a7595b57f ("nvme-tcp: request secure channel concatenation")
> Signed-off-by: Martin George <marting@netapp.com>
> ---
>   drivers/nvme/host/auth.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
> index 201fc8809a62..012fcfc79a73 100644
> --- a/drivers/nvme/host/auth.c
> +++ b/drivers/nvme/host/auth.c
> @@ -331,9 +331,10 @@ static int nvme_auth_set_dhchap_reply_data(struct nvme_ctrl *ctrl,
>   	} else {
>   		memset(chap->c2, 0, chap->hash_len);
>   	}
> -	if (ctrl->opts->concat)
> +	if (ctrl->opts->concat) {
>   		chap->s2 = 0;
> -	else
> +		chap->bi_directional = false;
> +	} else
>   		chap->s2 = nvme_auth_get_seqnum();
>   	data->seqnum = cpu_to_le32(chap->s2);
>   	if (chap->host_key_len) {

Reviewed-by: Hannes Reinecke <hare@suse.de>

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nvme-auth: update bi_directional flag
  2025-09-15 11:49 [PATCH] nvme-auth: update bi_directional flag Martin George
  2025-09-15 12:20 ` Hannes Reinecke
@ 2025-09-15 15:54 ` Keith Busch
  1 sibling, 0 replies; 3+ messages in thread
From: Keith Busch @ 2025-09-15 15:54 UTC (permalink / raw)
  To: Martin George; +Cc: linux-nvme, hch, sagi, hare, Martin George

On Mon, Sep 15, 2025 at 05:19:21PM +0530, Martin George wrote:
> While setting chap->s2 to zero as part of secure channel
> concatenation, the host missed out to disable the bi_directional
> flag to indicate that controller authentication is not requested.
> Fix the same.

Thanks, applied to nvme-6.18.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-15 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-15 11:49 [PATCH] nvme-auth: update bi_directional flag Martin George
2025-09-15 12:20 ` Hannes Reinecke
2025-09-15 15:54 ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox