Skip to content

compiler_types: Introduce __counted_by_ptr()

Kees Cook linux-fsdevel linux-hardening linux-kbuild linux-kselftest lkml llvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3compiler_types: Introduce __counted_by_ptr()Makefile include/linux/compiler_types.h include/uapi/linux/stddef.h +1 more+39 -19 replies
2/3lkdtm/bugs: Add __counted_by_ptr() test PTR_BOUNDSdrivers/misc/lkdtm/bugs.c tools/testing/selftests/lkdtm/tests.txt+84 -80 replies
3/3coredump: Use __counted_by_ptr for struct core_name::corenamefs/coredump.c+4 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] compiler_types: Introduce __counted_by_ptr()

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(-)
Signature · 1 line
2.34.1