kernel_samsung_a53x/tools/testing/selftests/net
Zijian Zhang 6f86f4c0f8 selftests: fix OOM in msg_zerocopy selftest
[ Upstream commit af2b7e5b741aaae9ffbba2c660def434e07aa241 ]

In selftests/net/msg_zerocopy.c, it has a while loop keeps calling sendmsg
on a socket with MSG_ZEROCOPY flag, and it will recv the notifications
until the socket is not writable. Typically, it will start the receiving
process after around 30+ sendmsgs. However, as the introduction of commit
dfa2f0483360 ("tcp: get rid of sysctl_tcp_adv_win_scale"), the sender is
always writable and does not get any chance to run recv notifications.
The selftest always exits with OUT_OF_MEMORY because the memory used by
opt_skb exceeds the net.core.optmem_max. Meanwhile, it could be set to a
different value to trigger OOM on older kernels too.

Thus, we introduce "cfg_notification_limit" to force sender to receive
notifications after some number of sendmsgs.

Fixes: 07b65c5b31ce ("test: add msg_zerocopy test")
Signed-off-by: Zijian Zhang <zijianzhang@bytedance.com>
Signed-off-by: Xiaochun Lu <xiaochun.lu@bytedance.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20240701225349.3395580-2-zijianzhang@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 14:19:41 +01:00
..
forwarding Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mptcp selftests/net: mptcp: fix uninitialized variable warnings 2024-11-18 12:11:10 +01:00
altnames.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
config Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
devlink_port_split.py Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drop_monitor_tests.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fcnal-test.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib-onlink-tests.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib_nexthop_multiprefix.sh selftests/net: fix grep checking for fib_nexthop_multiprefix 2024-11-18 12:12:36 +01:00
fib_nexthops.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib_rule_tests.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fib_tests.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fin_ack_lat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fin_ack_lat.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hwtstamp_config.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
icmp_redirect.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
in_netns.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip6_gre_headroom.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip_defrag.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip_defrag.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipsec.c selftests/net: ipsec: fix constant out of range 2024-11-18 12:11:10 +01:00
ipv6_flowlabel.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipv6_flowlabel.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipv6_flowlabel_mgr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
l2tp.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msg_zerocopy.c selftests: fix OOM in msg_zerocopy selftest 2024-11-19 14:19:41 +01:00
msg_zerocopy.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netdevice.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nettest.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmtu.sh selftests: net: avoid just another constant wait 2024-11-18 12:13:24 +01:00
psock_fanout.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psock_lib.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psock_snd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psock_snd.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psock_tpacket.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reuseaddr_conflict.c selftests: reuseaddr_conflict: add missing new line at the end of the output 2024-11-19 09:22:47 +01:00
reuseaddr_ports_exhausted.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reuseaddr_ports_exhausted.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reuseport_addr_any.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reuseport_addr_any.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reuseport_bpf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reuseport_bpf_cpu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reuseport_bpf_numa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reuseport_dualstack.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
route_localnet.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rtnetlink.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
run_afpackettests Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
run_netsocktests Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rxtimestamp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rxtimestamp.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
so_txtime.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
so_txtime.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
socket.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp_fastopen_backup_key.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp_fastopen_backup_key.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp_inq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcp_mmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_blackhole_dev.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_bpf.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_vxlan_fdb_changelink.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test_vxlan_under_vrf.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timestamping.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tls.c selftests: tls: use exact comparison in recv_partial 2024-11-19 08:44:35 +01:00
traceroute.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
txring_overwrite.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
txtimestamp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
txtimestamp.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udpgro.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udpgro_bench.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udpgso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udpgso.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udpgso_bench.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udpgso_bench_rx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udpgso_bench_tx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vrf-xfrm-tests.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vrf_route_leaking.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vrf_strict_mode_test.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xfrm_policy.sh Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00