linux/drivers/firewire
Kees Cook c12d7aa7ff firewire: Annotate struct fw_node 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 fw_node.

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

Cc: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: linux1394-devel@lists.sourceforge.net
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20230922175334.work.335-kees@kernel.org
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
2023-11-05 21:15:17 +09:00
..
.kunitconfig firewire: add KUnit test to check layout of UAPI structures 2023-05-30 08:12:39 +09:00
core-card.c Merge branch 'for-linus' into for-next 2022-05-23 07:48:27 +02:00
core-cdev.c firewire: cdev: implement new event relevant to phy packet with time stamp 2023-05-30 08:12:40 +09:00
core-device.c Revert "firewire: core: obsolete usage of GFP_ATOMIC at building node tree" 2023-09-15 18:37:52 +09:00
core-iso.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
core-topology.c Revert "firewire: core: obsolete usage of GFP_ATOMIC at building node tree" 2023-09-15 18:37:52 +09:00
core-transaction.c firewire: core: implement variations to send request and wait for response with time stamp 2023-05-30 08:12:40 +09:00
core.h firewire: Annotate struct fw_node with __counted_by 2023-11-05 21:15:17 +09:00
init_ohci1394_dma.c firewire: init_ohci1394_dma: use correct function names in comments 2023-04-24 09:19:35 +09:00
Kconfig firewire: add KUnit test to check layout of UAPI structures 2023-05-30 08:12:39 +09:00
Makefile firewire: add KUnit test to check layout of UAPI structures 2023-05-30 08:12:39 +09:00
net.c firewire: net: fix use after free in fwnet_finish_incoming_packet() 2023-06-24 14:03:46 +09:00
nosy-user.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nosy.c firewire: nosy: switch from 'pci_' to 'dma_' API 2021-07-05 22:23:15 +02:00
nosy.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ohci.c firewire: ohci: release buffer for AR req/resp contexts when managed resource is released 2023-06-06 07:54:24 +09:00
ohci.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sbp2.c scsi: sd: Introduce manage_shutdown device flag 2023-10-27 10:00:19 +09:00
uapi-test.c firewire: fix build failure due to missing module license 2023-05-30 19:37:29 +09:00