linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] compiler_types: Introduce __counted_by_ptr()
@ 2025-10-20 22:01 Kees Cook
  2025-10-20 22:01 ` [PATCH 1/3] " Kees Cook
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Kees Cook @ 2025-10-20 22:01 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Kees Cook, Al Viro, Nathan Chancellor, Nick Desaulniers,
	Bill Wendling, Justin Stitt, Peter Zijlstra, Marco Elver,
	Przemek Kitszel, Andrew Morton, Masahiro Yamada, Christophe Leroy,
	Johannes Weiner, Arnd Bergmann, Greg Kroah-Hartman,
	Christian Brauner, Jan Kara, Nicolas Schier, Shuah Khan,
	Gustavo A. R. Silva, Thomas Weißschuh, Tamir Duberstein,
	Michael Kelley, kernel test robot, Heiko Carstens, Uros Bizjak,
	Jan Hendrik Farr, Yafang Shao, Marc Herbert, Christopher Ferris,
	Jakub Kicinski, Alexander Lobakin, Paolo Abeni, Tejun Heo,
	Jeff Xu, Michal Koutný, Shakeel Butt, Randy Dunlap,
	Brian Gerst, linux-kernel, llvm, linux-fsdevel, linux-kbuild,
	linux-kselftest, linux-hardening

Hi,

Add the __counted_by_ptr() macro for annotating pointer struct members
with the "counted_by" attribute. Add LKDTM test, and a first user.

-Kees

Kees Cook (3):
  compiler_types: Introduce __counted_by_ptr()
  lkdtm/bugs: Add __counted_by_ptr() test PTR_BOUNDS
  coredump: Use __counted_by_ptr for struct core_name::corename

 init/Kconfig                            | 11 +++
 Makefile                                |  4 ++
 include/linux/compiler_types.h          | 21 +++++-
 include/uapi/linux/stddef.h             |  4 ++
 drivers/misc/lkdtm/bugs.c               | 90 ++++++++++++++++++++++---
 fs/coredump.c                           |  8 +--
 tools/testing/selftests/lkdtm/tests.txt |  2 +
 7 files changed, 127 insertions(+), 13 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2025-10-23 13:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20 22:01 [PATCH 0/3] compiler_types: Introduce __counted_by_ptr() Kees Cook
2025-10-20 22:01 ` [PATCH 1/3] " Kees Cook
2025-10-20 22:34   ` Marco Elver
2025-10-20 22:53   ` Bill Wendling
2025-10-21  9:59     ` Peter Zijlstra
2025-10-21  9:54   ` Peter Zijlstra
2025-10-21 19:24     ` Kees Cook
2025-10-22  8:20       ` Peter Zijlstra
2025-10-23  0:47       ` Kees Cook
2025-10-23  8:01         ` Peter Zijlstra
2025-10-23 13:45           ` Kees Cook
2025-10-20 22:01 ` [PATCH 2/3] lkdtm/bugs: Add __counted_by_ptr() test PTR_BOUNDS Kees Cook
2025-10-20 22:01 ` [PATCH 3/3] coredump: Use __counted_by_ptr for struct core_name::corename Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).