linux_dsm_epyc7002/drivers/net/netdevsim
Toke Høiland-Jørgensen e4ff5aa469 netdevsim: Add debugfs toggle to reject BPF programs in verifier
This adds a new debugfs toggle ('bpf_bind_verifier_accept') that can be
used to make netdevsim reject BPF programs from being accepted by the
verifier. If this toggle (which defaults to true) is set to false,
nsim_bpf_verify_insn() will return EOPNOTSUPP on the last
instruction (after outputting the 'Hello from netdevsim' verifier message).

This makes it possible to check the verification callback in the driver
from test_offload.py in selftests, since the verifier now clears the
verifier log on a successful load, hiding the message from the driver.

Fixes: 6f8a57ccf8 ("bpf: Make verifier log more relevant by default")
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/bpf/160752225964.110217.12584017165318065332.stgit@toke.dk
2020-12-09 16:27:42 +01:00
..
bpf.c netdevsim: Add debugfs toggle to reject BPF programs in verifier 2020-12-09 16:27:42 +01:00
bus.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
dev.c netdevsim: set .owner to THIS_MODULE 2020-11-17 14:08:59 -08:00
ethtool.c netdevsim: fix duplicated debugfs directory 2020-09-26 14:19:08 -07:00
fib.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
health.c netdevsim: set .owner to THIS_MODULE 2020-11-17 14:08:59 -08:00
ipsec.c net: netdevsim: Use scnprintf() for avoiding potential buffer overflow 2020-03-15 17:06:22 -07:00
Makefile netdevsim: add pause frame stats 2020-09-15 13:26:28 -07:00
netdev.c netdevsim: add pause frame stats 2020-09-15 13:26:28 -07:00
netdevsim.h netdevsim: Add debugfs toggle to reject BPF programs in verifier 2020-12-09 16:27:42 +01:00
udp_tunnels.c netdevsim: set .owner to THIS_MODULE 2020-11-17 14:08:59 -08:00