mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
2dd3071892
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> |
||
---|---|---|
.. | ||
Makefile | ||
t7xx_cldma.c | ||
t7xx_cldma.h | ||
t7xx_dpmaif.c | ||
t7xx_dpmaif.h | ||
t7xx_hif_cldma.c | ||
t7xx_hif_cldma.h | ||
t7xx_hif_dpmaif_rx.c | ||
t7xx_hif_dpmaif_rx.h | ||
t7xx_hif_dpmaif_tx.c | ||
t7xx_hif_dpmaif_tx.h | ||
t7xx_hif_dpmaif.c | ||
t7xx_hif_dpmaif.h | ||
t7xx_mhccif.c | ||
t7xx_mhccif.h | ||
t7xx_modem_ops.c | ||
t7xx_modem_ops.h | ||
t7xx_netdev.c | ||
t7xx_netdev.h | ||
t7xx_pci.c | ||
t7xx_pci.h | ||
t7xx_pcie_mac.c | ||
t7xx_pcie_mac.h | ||
t7xx_port_ctrl_msg.c | ||
t7xx_port_proxy.c | ||
t7xx_port_proxy.h | ||
t7xx_port_trace.c | ||
t7xx_port_wwan.c | ||
t7xx_port.h | ||
t7xx_reg.h | ||
t7xx_state_monitor.c | ||
t7xx_state_monitor.h |