linux/drivers/infiniband/hw/usnic
Kees Cook ed7c64de62 RDMA/usnic: Annotate struct usnic_uiom_chunk 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 usnic_uiom_chunk.

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

Cc: Christian Benvenuti <benve@cisco.com>
Cc: Nelson Escobar <neescoba@cisco.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: linux-rdma@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20230929180431.3005464-3-keescook@chromium.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2023-10-02 14:44:54 +03:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile infiniband: prefix header search paths with $(srctree)/ 2019-01-25 15:28:50 -07:00
usnic_abi.h
usnic_common_pkt_hdr.h
usnic_common_util.h
usnic_debugfs.c RDMA/usnic: Delete useless module.h include 2022-01-28 13:03:13 -04:00
usnic_debugfs.h
usnic_fwd.c RDMA: Constify netdev->dev_addr accesses 2021-10-25 14:33:09 -03:00
usnic_fwd.h RDMA: Constify netdev->dev_addr accesses 2021-10-25 14:33:09 -03:00
usnic_ib_main.c RDMA/usnic: Remove redundant pci_clear_master 2023-03-29 13:08:22 +03:00
usnic_ib_qp_grp.c RDMA/usnic: Delete useless module.h include 2022-01-28 13:03:13 -04:00
usnic_ib_qp_grp.h RDMA: Globally allocate and release QP memory 2021-08-03 13:44:27 -03:00
usnic_ib_sysfs.c RDMA/usnic: Delete useless module.h include 2022-01-28 13:03:13 -04:00
usnic_ib_sysfs.h RDMA/drivers: Use core provided API for registering device attributes 2018-10-17 03:45:01 -06:00
usnic_ib_verbs.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
usnic_ib_verbs.h RDMA: Globally allocate and release QP memory 2021-08-03 13:44:27 -03:00
usnic_ib.h RDMA/usnic: Lock VF with mutex instead of spinlock 2021-09-24 10:55:28 -03:00
usnic_log.h
usnic_transport.c RDMA/usnic: Delete useless module.h include 2022-01-28 13:03:13 -04:00
usnic_transport.h
usnic_uiom_interval_tree.c treewide: Change list_sort to use const pointers 2021-04-08 16:04:22 -07:00
usnic_uiom_interval_tree.h lib/interval_tree: fast overlap detection 2017-09-08 18:26:49 -07:00
usnic_uiom.c mm/gup: remove vmas parameter from pin_user_pages() 2023-06-09 16:25:26 -07:00
usnic_uiom.h RDMA/usnic: Annotate struct usnic_uiom_chunk with __counted_by 2023-10-02 14:44:54 +03:00
usnic_vnic.c RDMA/usnic: Delete useless module.h include 2022-01-28 13:03:13 -04:00
usnic_vnic.h
usnic.h