linux/arch
Kees Cook cfa36f889f sparc: Annotate struct cpuinfo_tree 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 checking 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 cpuinfo_tree.

[1] https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci

Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Reviewed-by: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20230922175159.work.357-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
2023-10-06 13:25:17 -07:00
..
alpha Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
arc ARC updates for v6.6 2023-09-04 15:38:24 -07:00
arm hardening: Provide Kconfig fragments for basic options 2023-09-22 09:50:55 -07:00
arm64 hardening: Provide Kconfig fragments for basic options 2023-09-22 09:50:55 -07:00
csky arch/csky 2nd patches for 6.6 2023-09-01 08:02:45 -07:00
hexagon Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
ia64 Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
loongarch LoongArch changes for v6.6 2023-09-08 12:16:52 -07:00
m68k ata changes for 6.6 2023-09-05 12:37:28 -07:00
microblaze Microblaze patches for 6.6-rc1 2023-09-05 10:15:22 -07:00
mips ARM: 2023-09-07 13:52:20 -07:00
nios2 Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
openrisc OpenRISC updates for 6.6 2023-09-05 10:09:31 -07:00
parisc parisc architecture fixes and enhancements for kernel v6.6-rc2: 2023-09-13 11:35:53 -07:00
powerpc hardening: Provide Kconfig fragments for basic options 2023-09-22 09:50:55 -07:00
riscv riscv: errata: fix T-Head dcache.cva encoding 2023-09-12 13:58:40 -07:00
s390 Including fixes from netfilter and bpf. 2023-09-07 18:33:07 -07:00
sh sh updates for v6.6 2023-09-09 14:46:57 -07:00
sparc sparc: Annotate struct cpuinfo_tree with __counted_by 2023-10-06 13:25:17 -07:00
um um,ethertap: Replace deprecated strncpy() with strscpy() 2023-09-29 11:37:50 -07:00
x86 hardening: Provide Kconfig fragments for basic options 2023-09-22 09:50:55 -07:00
xtensa Xtensa updates for v6.6 2023-09-07 10:30:17 -07:00
.gitignore
Kconfig Add x86 shadow stack support 2023-08-31 12:20:12 -07:00