linux/drivers/net/wwan/t7xx
Gustavo A. R. Silva 2dd3071892 net: wwan: t7xx: Add __counted_by for struct t7xx_fsm_event and use struct_size()
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 via CONFIG_UBSAN_BOUNDS (for
array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family
functions).

While there, use struct_size() helper, instead of the open-coded
version, to calculate the size for the allocation of the whole
flexible structure, including of course, the flexible-array member.

This code was found with the help of Coccinelle, and audited and
fixed manually.

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-10-13 10:11:48 +01:00
..
Makefile net: wwan: t7xx: do not compile with -Werror 2023-03-31 09:34:53 +01:00
t7xx_cldma.c
t7xx_cldma.h
t7xx_dpmaif.c net: wwan: t7xx: Fix return type of t7xx_dl_add_timedout() 2022-05-16 11:41:50 +01:00
t7xx_dpmaif.h net: wwan: t7xx: Data path HW layer 2022-05-09 10:51:59 +01:00
t7xx_hif_cldma.c net: wwan: t7xx: Add AP CLDMA 2023-07-12 17:16:56 -07:00
t7xx_hif_cldma.h net: wwan: t7xx: Add AP CLDMA 2023-07-12 17:16:56 -07:00
t7xx_hif_dpmaif_rx.c netdev: replace napi_reschedule with napi_schedule 2023-10-11 17:28:06 -07:00
t7xx_hif_dpmaif_rx.h net: wwan: t7xx: Add NAPI support 2022-11-07 09:34:12 +00:00
t7xx_hif_dpmaif_tx.c net: wwan: t7xx: Use alloc_ordered_workqueue() to create ordered workqueues 2023-05-25 12:15:29 -10:00
t7xx_hif_dpmaif_tx.h net: wwan: t7xx: Add data path interface 2022-05-09 10:51:59 +01:00
t7xx_hif_dpmaif.c net: wwan: t7xx: Fix Runtime PM resume sequence 2023-01-28 13:20:20 +00:00
t7xx_hif_dpmaif.h net: wwan: t7xx: Add NAPI support 2022-11-07 09:34:12 +00:00
t7xx_mhccif.c net: wwan: t7xx: Device deep sleep lock/unlock 2022-05-09 10:51:59 +01:00
t7xx_mhccif.h net: wwan: t7xx: Add AP CLDMA 2023-07-12 17:16:56 -07:00
t7xx_modem_ops.c net: wwan: t7xx: Add AP CLDMA 2023-07-12 17:16:56 -07:00
t7xx_modem_ops.h net: wwan: t7xx: Add AP CLDMA 2023-07-12 17:16:56 -07:00
t7xx_netdev.c net: wwan: t7xx: Fix Runtime PM resume sequence 2023-01-28 13:20:20 +00:00
t7xx_netdev.h net: wwan: t7xx: Add NAPI support 2022-11-07 09:34:12 +00:00
t7xx_pci.c net: wwan: t7xx: Ensure init is completed before system sleep 2023-05-17 13:02:25 +01:00
t7xx_pci.h net: wwan: t7xx: Ensure init is completed before system sleep 2023-05-17 13:02:25 +01:00
t7xx_pcie_mac.c
t7xx_pcie_mac.h
t7xx_port_ctrl_msg.c net: wwan: t7xx: Add AP CLDMA 2023-07-12 17:16:56 -07:00
t7xx_port_proxy.c net: wwan: t7xx: Add AP CLDMA 2023-07-12 17:16:56 -07:00
t7xx_port_proxy.h net: wwan: t7xx: Add port for modem logging 2022-11-02 11:39:49 +00:00
t7xx_port_trace.c net: wwan: t7xx: Add port for modem logging 2022-11-02 11:39:49 +00:00
t7xx_port_wwan.c wwan: core: Support slicing in port TX flow of WWAN subsystem 2023-03-17 22:38:31 -07:00
t7xx_port.h net: wwan: t7xx: Add AP CLDMA 2023-07-12 17:16:56 -07:00
t7xx_reg.h net: wwan: t7xx: Add AP CLDMA 2023-07-12 17:16:56 -07:00
t7xx_state_monitor.c net: wwan: t7xx: Add __counted_by for struct t7xx_fsm_event and use struct_size() 2023-10-13 10:11:48 +01:00
t7xx_state_monitor.h net: wwan: t7xx: Add __counted_by for struct t7xx_fsm_event and use struct_size() 2023-10-13 10:11:48 +01:00