linux/drivers/infiniband/hw/hfi1
Kees Cook 964168970c IB/hfi1: Annotate struct tid_rb_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 tid_rb_node.

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

Cc: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.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-7-keescook@chromium.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
2023-10-02 14:44:54 +03:00
..
affinity.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
affinity.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
aspm.c IB/hfi1: Reduce excessive aspm inlines 2019-06-28 22:34:26 -03:00
aspm.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
chip_registers.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
chip.c IB/hfi1: Replace deprecated strncpy 2023-09-22 13:28:54 +03:00
chip.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
common.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
debugfs.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
debugfs.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
device.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
device.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
driver.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
efivar.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
efivar.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
eprom.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
eprom.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
exp_rcv.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
exp_rcv.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
fault.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
fault.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
file_ops.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
firmware.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
hfi.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
init.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
intr.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
iowait.c RDMA/hw/hfi1/iowait: Demote half-completed kernel-doc and fix formatting issue in another 2021-01-28 15:42:26 -04:00
iowait.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
ipoib_main.c IB/hfi1: Fix tstats alloc and dealloc 2022-01-28 11:12:15 -04:00
ipoib_rx.c IB/hfi1: Use skb_put_data() instead of skb_put/memcpy pair 2022-09-27 10:43:10 -03:00
ipoib_tx.c IB/hfi1: Remove open coded reference to skb frag offset 2023-09-18 14:24:15 +03:00
ipoib.h IB/hfi1: Fix alloc failure with larger txqueuelen 2022-01-28 11:12:15 -04:00
Kconfig RDMA/hfi1: Depend on !UML 2022-07-18 13:40:38 +03:00
mad.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
mad.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
Makefile RDMA/hfi1: Move user SDMA system memory pinning code to its own file 2023-08-22 17:31:45 +03:00
mmu_rb.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
mmu_rb.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
msix.c RDMA/hfi1: Convert to SPDX identifier 2021-08-25 14:56:48 -03:00
msix.h RDMA/hfi1: Convert to SPDX identifier 2021-08-25 14:56:48 -03:00
netdev_rx.c IB/hfi1: Switch to netif_napi_add() 2022-12-01 11:09:48 +02:00
netdev.h IB/hfi1: Rework AIP and VNIC dummy netdev usage 2021-04-13 13:54:56 -03:00
opa_compat.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
opfn.c
opfn.h
pcie.c RDMA/hfi1: Use FIELD_GET() to extract Link Width 2023-09-20 10:30:38 +03:00
pin_system.c RDMA/hfi1: Move user SDMA system memory pinning code to its own file 2023-08-22 17:31:45 +03:00
pinning.h RDMA/hfi1: Move user SDMA system memory pinning code to its own file 2023-08-22 17:31:45 +03:00
pio_copy.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
pio.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
pio.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
platform.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
platform.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
qp.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
qp.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
qsfp.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
qsfp.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
rc.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
rc.h
ruc.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
sdma_txreq.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
sdma.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
sdma.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
sysfs.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
tid_rdma.c treewide: use get_random_u32() when possible 2022-10-11 17:42:58 -06:00
tid_rdma.h IB/hfi1: Calculate flow weight based on QP MTU for TID RDMA 2019-11-06 13:15:36 -04:00
trace_ctxts.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
trace_dbg.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
trace_ibhdrs.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
trace_iowait.h
trace_misc.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
trace_mmu.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
trace_rc.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
trace_rx.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
trace_tid.h treewide: Add missing semicolons to __assign_str uses 2021-06-30 09:19:14 -04:00
trace_tx.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
trace.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
trace.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
uc.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
ud.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
user_exp_rcv.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
user_exp_rcv.h IB/hfi1: Annotate struct tid_rb_node with __counted_by 2023-10-02 14:44:54 +03:00
user_pages.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
user_sdma.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
user_sdma.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
verbs_txreq.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
verbs_txreq.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
verbs.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
verbs.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
vnic_main.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
vnic_sdma.c IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00
vnic.h IB: Use capital "OR" for multiple licenses in SPDX 2023-09-11 14:14:00 +03:00