public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] string.h: Use ARRAY_SIZE() for memtostr*()/strtomem*()
@ 2025-02-06 18:11 Kees Cook
  2025-02-06 18:11 ` [PATCH 1/3] compiler.h: Move C string helpers into C-only kernel section Kees Cook
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Kees Cook @ 2025-02-06 18:11 UTC (permalink / raw)
  To: Suren Baghdasaryan
  Cc: Kees Cook, Kent Overstreet, Andy Shevchenko, Luc Van Oostenryck,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
	Philipp Reisner, Miguel Ojeda, linux-kernel, linux-hardening,
	llvm

Work around a Clang 14 bug by switching to ARRAY_SIZE() (with the
added benefit of explicitly checking for char array arguments) in
memtostr*/strtomem*().

-Kees

Kees Cook (3):
  compiler.h: Move C string helpers into C-only kernel section
  compiler.h: Introduce __must_be_char_array()
  string.h: Use ARRAY_SIZE() for memtostr*()/strtomem*()

 include/linux/compiler.h | 32 +++++++++++++++++++-------------
 include/linux/string.h   | 12 ++++++++----
 2 files changed, 27 insertions(+), 17 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-02-07 13:59 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 18:11 [PATCH 0/3] string.h: Use ARRAY_SIZE() for memtostr*()/strtomem*() Kees Cook
2025-02-06 18:11 ` [PATCH 1/3] compiler.h: Move C string helpers into C-only kernel section Kees Cook
2025-02-06 20:07   ` Miguel Ojeda
2025-02-06 21:28     ` Kees Cook
2025-02-06 18:11 ` [PATCH 2/3] compiler.h: Introduce __must_be_char_array() Kees Cook
2025-02-06 19:56   ` David Laight
2025-02-06 21:34     ` Kees Cook
2025-02-06 20:50   ` Kent Overstreet
2025-02-06 21:26     ` Kees Cook
2025-02-07  8:55   ` Rasmus Villemoes
2025-02-07 13:13     ` David Laight
2025-02-07 13:58   ` Kent Overstreet
2025-02-06 18:11 ` [PATCH 3/3] string.h: Use ARRAY_SIZE() for memtostr*()/strtomem*() Kees Cook
2025-02-06 18:41 ` [PATCH 0/3] " Andy Shevchenko
2025-02-06 18:44   ` Miguel Ojeda
2025-02-06 18:45     ` Andy Shevchenko
2025-02-06 18:52       ` Kees Cook
2025-02-06 19:12         ` Andy Shevchenko

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