mirror-linux/include
Kees Cook 3e584e32b1 nexthop: Annotate struct nh_notifier_res_table_info with __counted_by
Prepare for the coming implementation by GCC and Clang of the __counted_by
attribute. Flexible array members annotated with __counted_by can have
their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

As found with Coccinelle[1], add __counted_by for struct
nh_notifier_res_table_info.

Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Tom Rix <trix@redhat.com>
Cc: llvm@lists.linux.dev
Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci [1]
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20231003231818.work.883-kees@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-10-05 18:31:34 -07:00
..
acpi
asm-generic Kbuild fixes for v6.6 (2nd) 2023-10-01 13:48:46 -07:00
clocksource
crypto
drm drm/tests: helpers: Avoid a driver uaf 2023-09-14 13:57:58 +02:00
dt-bindings
keys
kunit
kvm
linux Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-10-05 13:16:47 -07:00
math-emu
media
memory
misc
net nexthop: Annotate struct nh_notifier_res_table_info with __counted_by 2023-10-05 18:31:34 -07:00
pcmcia
ras
rdma
rv
scsi ATA fixes for 6.6-rc4 2023-09-29 13:38:34 -07:00
soc
sound
target
trace net: implement lockless SO_MAX_PACING_RATE 2023-10-01 19:09:54 +01:00
uapi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-10-05 13:16:47 -07:00
ufs
vdso
video
xen arm/xen: remove lazy mode related definitions 2023-09-19 07:04:49 +02:00