linux-stable/include
Kees Cook 1442d628d0 mtd: cfi: Annotate struct cfi_private 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 cfi_private.

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

Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230915201206.never.107-kees@kernel.org
2023-09-22 16:33:23 +02:00
..
acpi Merge branches 'acpi-scan', 'acpi-tad', 'acpi-extlog' and 'acpi-misc' 2023-08-25 20:49:52 +02:00
asm-generic ata changes for 6.6 2023-09-05 12:37:28 -07:00
clocksource
crypto This update includes the following changes: 2023-08-29 11:23:29 -07:00
drm drm for 6.6-rc1 2023-08-30 13:34:34 -07:00
dt-bindings IOMMU Updates for Linux v6.6 2023-09-01 16:54:25 -07:00
keys
kunit - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
kvm
linux mtd: cfi: Annotate struct cfi_private with __counted_by 2023-09-22 16:33:23 +02:00
math-emu
media media updates for v6.6-rc1 2023-09-01 12:21:32 -07:00
memory
misc
net Including fixes from netfilter and bpf. 2023-09-07 18:33:07 -07:00
pcmcia
ras
rdma
rv rv: Set variable 'da_mon_##name' to static 2023-09-01 21:00:00 -04:00
scsi SCSI misc on 20230909 2023-09-09 12:01:33 -07:00
soc IOMMU Updates for Linux v6.6 2023-09-01 16:54:25 -07:00
sound ASoC: Name iov_iter argument as iterator instead of buffer 2023-09-01 15:38:49 +02:00
target
trace tracing: Replace strlcpy with strscpy in trace/events/task.h 2023-09-01 21:00:00 -04:00
uapi RISC-V Patches for the 6.6 Merge Window, Part 2 (try 2) 2023-09-09 14:25:11 -07:00
ufs Merge branch 'fixes' into misc 2023-09-02 08:25:19 +01:00
vdso
video
xen dma-maping updates for Linux 6.6 2023-08-29 20:32:10 -07:00