test_bpf: add 173 new testcases for eBPF
Subsystems (5)
PATCH 1/1 test_bpf: add 173 new testcases for eBPF
From: Michael Holzheu <[email protected]>
From: Michael Holzheu <[email protected]>
add an exhaustive set of eBPF tests bringing total to:test_bpf: Summary: 233 PASSED, 0 FAILED, [0/226 JIT'ed]
---
these tests found div64 bug in interpreter (already fixed) and another cpu_to_be16 bug in x64 JIT (fix is being worked on).
include/linux/filter.h | 10 + lib/test_bpf.c | 2192 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 2202 insertions(+)
include/linux/filter.h +10 -0
@@ -207,6 +207,16 @@ struct bpf_prog_aux; .off = OFF, \ .imm = 0 }) +/* Atomic memory add, *(uint *)(dst_reg + off16) += src_reg */ + +#define BPF_STX_XADD (SIZE ,DST ,SRC ,OFF ) \ + ((struct bpf_insn) { \ + .code = BPF_STX | BPF_SIZE(SIZE) | BPF_XADD, \ + .dst_reg = DST, \ + .src_reg = SRC, \ + .off = OFF, \ + .imm = 0 }) +/* Memory store, *(uint *) (dst_reg + off16) = imm32 */ #define BPF_ST_MEM (SIZE ,DST ,OFF ,IMM ) \
lib/test_bpf.c +2192 -0
2,198 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Quoted 3 lines · Alexei Starovoitov
From: Michael Holzheu <[email protected]>
From: Michael Holzheu <[email protected]>
'From' tag somehow slipped in twice for some reason. Downloading the mbox and applying it shows the second on in the git log.
Quoted 5 lines
add an exhaustive set of eBPF tests bringing total to:
test_bpf: Summary: 233 PASSED, 0 FAILED, [0/226 JIT'ed]Signed-off-by Michael Holzheu <[email protected]>Signed-off-by Alexei Starovoitov <[email protected]>
Other than that, very nice to see this getting further extended!
Quoted 7 lines · Daniel Borkmann
Quoted 3 lines · Alexei Starovoitov
From: Michael Holzheu <[email protected]>
From: Michael Holzheu <[email protected]>
'From' tag somehow slipped in twice for some reason. Downloading the mbox and applying it shows the second on in the git log.
hmm, that's odd.
I've actually tried to manually 'git am' the patch before sending and it applied without extra 'From'.
But now I did 'pwclient git-am 471127' and indeed I see an extra 'From' line.
Strange.
Sure, will respin.
From: Alexei Starovoitov <[email protected]>
Date: Mon, 11 May 2015 22:22:44 -0700
Quoted 7 lines
From: Michael Holzheu <[email protected]>
add an exhaustive set of eBPF tests bringing total to:
test_bpf: Summary: 233 PASSED, 0 FAILED, [0/226 JIT'ed]Signed-off-by Michael Holzheu <[email protected]>Signed-off-by Alexei Starovoitov <[email protected]>
Applied.