From: Hannes Reinecke <hare@suse.de>
To: Eric Biggers <ebiggers@kernel.org>,
linux-nvme@lists.infradead.org, Keith Busch <kbusch@kernel.org>,
Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
Sagi Grimberg <sagi@grimberg.me>
Cc: John Garry <john.g.garry@oracle.com>
Subject: Re: [PATCH] nvme-auth: Avoid C=1 warning in nvme_auth_derive_tls_psk()
Date: Wed, 1 Jul 2026 13:04:23 +0200 [thread overview]
Message-ID: <950bfce8-71a3-4888-8edd-c8c0298d0bbc@suse.de> (raw)
In-Reply-To: <20260625175911.35094-1-ebiggers@kernel.org>
On 6/25/26 7:59 PM, Eric Biggers wrote:
> The following works fine with gcc and clang, but sparse warns about
> label_len not being an actual constant expression:
>
> const size_t label_len = sizeof(label) - 1;
> ...
> static_assert(label_len <= 255);
>
> Avoid this by giving label an explicit length and using sizeof(label)
> instead of label_len.
>
> Reported-by: John Garry <john.g.garry@oracle.com>
> Closes: https://lore.kernel.org/linux-nvme/965a37dd-f698-46b6-9623-1099a13f7e60@oracle.com
> Fixes: d126cbaa7d9a ("nvme-auth: common: use crypto library in nvme_auth_derive_tls_psk()")
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
> drivers/nvme/common/auth.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
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
next prev parent reply other threads:[~2026-07-01 11:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 17:59 [PATCH] nvme-auth: Avoid C=1 warning in nvme_auth_derive_tls_psk() Eric Biggers
2026-06-26 7:53 ` John Garry
2026-07-01 11:04 ` Hannes Reinecke [this message]
2026-07-06 18:55 ` Keith Busch
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=950bfce8-71a3-4888-8edd-c8c0298d0bbc@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=ebiggers@kernel.org \
--cc=hch@lst.de \
--cc=john.g.garry@oracle.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--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