]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
bpf: add test case for ld_abs and helper changing pkt data
authorDaniel Borkmann <daniel@iogearbox.net>
Thu, 14 Dec 2017 20:07:27 +0000 (21:07 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 15 Dec 2017 17:19:36 +0000 (09:19 -0800)
commit87ab8194303e73af2898e9e1c8b3b9bcfe91e7a9
treed6536ec187e003bb6a7c87cc8acdef20e16bf6c2
parent07aee94394547721ac168cbf4e1c09c14a5fe671
bpf: add test case for ld_abs and helper changing pkt data

Add a test that i) uses LD_ABS, ii) zeroing R6 before call, iii) calls
a helper that triggers reload of cached skb data, iv) uses LD_ABS again.
It's added for test_bpf in order to do runtime testing after JITing as
well as test_verifier to test that the sequence is allowed.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
lib/test_bpf.c
tools/testing/selftests/bpf/test_verifier.c