lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250206213532.it.087-kees@kernel.org>
Date: Thu,  6 Feb 2025 13:40:05 -0800
From: Kees Cook <kees@...nel.org>
To: Suren Baghdasaryan <surenb@...gle.com>
Cc: Kees Cook <kees@...nel.org>,
	Miguel Ojeda <ojeda@...nel.org>,
	Kent Overstreet <kent.overstreet@...ux.dev>,
	kernel test robot <lkp@...el.com>,
	Andy Shevchenko <andy@...nel.org>,
	Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
	Nathan Chancellor <nathan@...nel.org>,
	Nick Desaulniers <ndesaulniers@...gle.com>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>,
	Philipp Reisner <philipp.reisner@...bit.com>,
	linux-kernel@...r.kernel.org,
	linux-hardening@...r.kernel.org,
	llvm@...ts.linux.dev
Subject: [PATCH v2 0/3] string.h: Use ARRAY_SIZE() for memtostr*()/strtomem*()

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

 v2:
  - change __must_be_byte_array to __must_be_byte_array() (david)
  - add missed Suggested-by (kent)
  - clarify move log (miguel)
  - clarify cover letter Clang version (andy)
 v1: https://lore.kernel.org/lkml/20250206175216.work.225-kees@kernel.org/

-Kees

Kees Cook (3):
  compiler.h: Move C string helpers into C-only kernel section
  compiler.h: Introduce __must_be_byte_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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ