linux-stable/drivers/net/ethernet/hisilicon/hns
Kees Cook 2290999d27 net: hisilicon: Annotate struct rcb_common_cb 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 rcb_common_cb.

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

Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
Cc: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20230922172858.3822653-6-keescook@chromium.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-10-02 11:24:53 -07:00
..
hnae.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
hnae.h
hns_ae_adapt.c
hns_dsaf_gmac.c
hns_dsaf_gmac.h
hns_dsaf_mac.c
hns_dsaf_mac.h net: hns: Remove unused function declaration mac_adjust_link() 2023-08-08 14:56:22 -07:00
hns_dsaf_main.c net: ethernet: hisilicon: Convert to platform remove callback returning void 2023-09-20 09:06:38 +01:00
hns_dsaf_main.h
hns_dsaf_misc.c net: hns: Switch to use acpi_evaluate_dsm_typed() 2023-01-20 13:25:17 +00:00
hns_dsaf_misc.h
hns_dsaf_ppe.c net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
hns_dsaf_ppe.h net: hns: Annotate struct ppe_common_cb with __counted_by 2023-10-02 11:24:52 -07:00
hns_dsaf_rcb.c net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00
hns_dsaf_rcb.h net: hisilicon: Annotate struct rcb_common_cb with __counted_by 2023-10-02 11:24:53 -07:00
hns_dsaf_reg.h
hns_dsaf_xgmac.c
hns_dsaf_xgmac.h
hns_enet.c net: ethernet: hisilicon: Convert to platform remove callback returning void 2023-09-20 09:06:38 +01:00
hns_enet.h
hns_ethtool.c hns: use strscpy() to instead of strncpy() 2022-12-12 10:00:55 +00:00
Makefile