From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796523053; b=uaFN1XusO4o0cxZsYCeKI7oxIIILXhrHejlVQL9+5Ok7QlPQhVbvwelZihUEG+dDmH6c 9VvzODeyoHEPZ7rlHMYIRIKCD1SK3pzO9B9xCNpOYUZYXRgo/hZaRn8A3whfDvMgUWu5r Cebs5eaQKmu2iAxgiXbD5DZcLXhoiNengP9gs7otMzULLJUPaiKjpnKLp0sc4teRNTXGC 8KMfLWtajpGJ+Edfc2x2x3y+qJEK+iKz7j3cB9gig9585LaZqyrlSpdTpdKejPH6i1qyp N4IuePu95GCjnXih+BLWJLVgq1BvQcjPph+kL4MsUtrRe86xXvTQvwVij0ZbrBfxKhw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796523053; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=0mcnhMi9DaOilvU/3XQtUQawsXIMXVPm7Z+6wSzsQ/s=; b=xIluBnTzjtsYTr08oYelKuCtLkB4DoZDQZpzRSPcPUY7u8fLmBJ0dQwRIb7Uv+Zz3cQr 6mQew2L7ee9C91mMpnGVmVUC9iBp4fwYJ3J5I94f2VdsEJjwabwJVBRdtI3XCzsltWYYx M7FnWJy83v44ko+BYpaa6cihzlob8kovu9t/7f0SStd4aQsPvfQ2zMKTYO2/WEWraBOAW S+0nQxiuLbIod12pmumyWEgSIVYplMlmnPRQrqF7hI9iqVer4V/D7BuSoOp0k6SvUgMds jiaMin2bI0sNHM4W2nslFdki9A4wIhWGiOsVb80KRrFDxevoY99Hs2Dh+1B4bX2K4og== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="Bk/24GMW"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EFE4606A31F for ; Sun, 6 Dec 2026 02:10:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Bk/24GMW Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD6381F0092B; Sun, 6 Dec 2026 02:10:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796523052; bh=0mcnhMi9DaOilvU/3XQtUQawsXIMXVPm7Z+6wSzsQ/s=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Bk/24GMWRBkrNawBWZsBmsygN0IsSBDnIbPBf+vusc/8o4QCYYdBgo1YxOsZi09G+ O0lIzyh13EWUR3Tv77a/IZBgXuyx8WSsaueEE7IPU5pIwlfgoVFTocN65Oh/KOrZtK fON4wzdKQvhCLDj7U78W+8S2vD5TZBCNIW/s/cFUwXqOKU9Z8bqwuGwF5Ns3rMY1YK wAY4P1MHRqDdYu16CURRjVJ+kozlarIZM/Dwn3OBrp5IUFafGFryxTk1FGlOUXPJW6 7h8LFI+yvSTJMtecJdAWru1S4vlLEcFuZSSlUP/aM+lvv0YFR03GgLL2TgD8yA4qoB dc6bDbINsiuAA== Date: Sat, 5 Dec 2026 18:10:51 -0800 From: Eric Biggers To: HexCodeYT Cc: Jason@zx2c4.com, ardb@kernel.org, linux-crypto@vger.kernel.org Subject: Re: [PATCH] lib/crypto: tests: Annotate POLYVAL test vectors with __nonstring Message-ID: <20261206021051.GC362402@quark> References: <20261204131128.74519-1-pawan@hexcode.au> X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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