Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: HexCodeYT <pawan@hexcode.au>
Cc: Jason@zx2c4.com, ardb@kernel.org, linux-crypto@vger.kernel.org
Subject: Re: [PATCH] lib/crypto: tests: Annotate POLYVAL test vectors with __nonstring
Date: Sat, 5 Dec 2026 18:10:51 -0800	[thread overview]
Message-ID: <20261206021051.GC362402@quark> (raw)
In-Reply-To: <20261204131128.74519-1-pawan@hexcode.au>

On Sat, Dec 05, 2026 at 12:11:28AM +1100, HexCodeYT wrote:
> The RFC8452 POLYVAL test vectors use fixed-size binary arrays that
> intentionally omit the terminating NUL byte.
> 
> GCC emits three diagnostics when
> -Wunterminated-string-initialization is enabled because these
> arrays lack the nonstring attribute.
> 
> Annotate raw_key, data and expected_hash with __nonstring to
> eliminate these diagnostics without changing the array sizes or
> test vector contents.
> 
> Verified by compiling polyval_kunit.o on arm64 with GCC 16.2.1
> using -Werror=unterminated-string-initialization and with Clang
> 22.1.8. KUnit runtime tests were not run.
> 
> ChatGPT (GPT-6.2) assisted with the proposed annotations, test
> procedure and commit message. The contributor independently
> reviewed the changes and verified the compilation results.
> 
> Closes: https://github.com/KSPP/linux/issues/381
> Signed-off-by: HexCodeYT <pawan@hexcode.au>
> ---
>  lib/crypto/tests/polyval_kunit.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-next

- Eric

      reply	other threads:[~2026-12-06  2:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 13:11 [PATCH] lib/crypto: tests: Annotate POLYVAL test vectors with __nonstring HexCodeYT
2026-12-06  2:10 ` Eric Biggers [this message]

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=20261206021051.GC362402@quark \
    --to=ebiggers@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=pawan@hexcode.au \
    /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