diff options
author | Kees Cook <kees@kernel.org> | 2025-05-29 10:31:17 -0700 |
---|---|---|
committer | Eric Biggers <ebiggers@google.com> | 2025-06-15 18:14:49 -0700 |
commit | e202196b8aa249d78ab87eae56bbe0e71e3dc39c (patch) | |
tree | 78197503f6b3ad63cdfb91692a3cf4e425ca29a4 /kernel/bpf/arraymap.c | |
parent | 19272b37aa4f83ca52bdf9c16d5d81bdd1354494 (diff) |
lib/crypto: Annotate crypto strings with nonstring
Annotate various keys, ivs, and other byte arrays with __nonstring so
that static initializers will not complain about truncating the trailing
NUL byte under GCC 15 with -Wunterminated-string-initialization enabled.
Silences many warnings like:
../lib/crypto/aesgcm.c:642:27: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (13 chars into 12 available) [-Wunterminated-string-initialization]
642 | .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/r/20250529173113.work.760-kees@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions