aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/sendmsg_unix_prog.c
diff options
context:
space:
mode:
authorDmitry Antipov <[email protected]>2023-12-11 12:05:32 +0300
committerJakub Kicinski <[email protected]>2023-12-12 13:20:37 -0800
commit2a62644800208fcba79a55b297ec0d9aad115221 (patch)
tree68813d8935f7def9770eb4cbac3afac7997bdcd7 /tools/testing/selftests/bpf/progs/sendmsg_unix_prog.c
parent609c767f2c5505f104ed6bbb3554158131913f86 (diff)
net: asix: fix fortify warning
When compiling with gcc version 14.0.0 20231129 (experimental) and CONFIG_FORTIFY_SOURCE=y, I've noticed the following warning: ... In function 'fortify_memcpy_chk', inlined from 'ax88796c_tx_fixup' at drivers/net/ethernet/asix/ax88796c_main.c:287:2: ./include/linux/fortify-string.h:588:25: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning] 588 | __read_overflow2_field(q_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... This call to 'memcpy()' is interpreted as an attempt to copy TX_OVERHEAD (which is 8) bytes from 4-byte 'sop' field of 'struct tx_pkt_info' and thus overread warning is issued. Since we actually want to copy both 'sop' and 'seg' fields at once, use the convenient 'struct_group()' here. Signed-off-by: Dmitry Antipov <[email protected]> Acked-by: Ɓukasz Stelmach <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/sendmsg_unix_prog.c')
0 files changed, 0 insertions, 0 deletions