linux_dsm_epyc7002/tools/testing/selftests
Quentin Monnet 9045bdc8ed selftests/bpf: check bpf verifier log buffer usage works for HW offload
Make netdevsim print a message to the BPF verifier log buffer when a
program is offloaded.

Then use this message in hardware offload selftests to make sure that
using this buffer actually prints the message to the console for
eBPF hardware offload.

The message is appended after the last instruction is processed with the
verifying function from netdevsim. Output looks like the following:

    $ tc filter add dev foo ingress bpf obj sample_ret0.o \
        sec .text verbose skip_sw

    Prog section '.text' loaded (5)!
     - Type:         3
     - Instructions: 2 (0 over limit)
     - License:

    Verifier analysis:

    0: (b7) r0 = 0
    1: (95) exit
    [netdevsim] Hello from netdevsim!
    processed 2 insns, stack depth 0

"verbose" flag is required to see it in the console since netdevsim does
not throw an error after printing the message.

Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-01-23 20:24:31 -05:00
..
android
bpf selftests/bpf: check bpf verifier log buffer usage works for HW offload 2018-01-23 20:24:31 -05:00
breakpoints
capabilities
cpu-hotplug
cpufreq
drivers/gpu
efivarfs
exec
filesystems
firmware
ftrace
futex
gpio
ia64
intel_pstate
ipc
kcmp
kmod
lib
locking
media_tests
membarrier
memfd
memory-hotplug
mount
mqueue
net
networking/timestamping
nsfs
ntb
powerpc
prctl
pstore
ptp
ptrace
rcutorture
seccomp
sigaltstack
size
splice
static_keys
sync
sysctl
tc-testing
timers
user
vDSO
vm
watchdog
x86 Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-01-14 09:51:25 -08:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_harness.h
kselftest_install.sh
kselftest.h
lib.mk
Makefile