test_bpf: add 173 new testcases for eBPF
Subsystems (5)
PATCH v2 1/1 test_bpf: add 173 new testcases for eBPF
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]
---V1->V2: removed double 'From', added 'Ack'
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
David Miller
maintainerFrom: Alexei Starovoitov <[email protected]>
Date: Tue, 12 May 2015 08:38:16 -0700
Quoted 5 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]
Quoted 8 lines
Signed-off-by Michael Holzheu <[email protected]>Signed-off-by Alexei Starovoitov <[email protected]>Acked-by Daniel Borkmann <[email protected]>---
V1->V2: removed double 'From', added 'Ack'these tests found div64 bug in interpreter (already fixed) and another
cpu_to_be16bug in x64 JIT (fix is being worked on).
Sorry, I applied V1 of this, and in fact I removed the double From:
when I applied it.
I hope this is ok.
Quoted 14 lines · David Miller
From: Alexei Starovoitov <[email protected]>
Date: Tue, 12 May 2015 08:38:16 -0700Quoted 11 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]>Acked-by Daniel Borkmann <[email protected]>---
V1->V2: removed double 'From', added 'Ack'
Quoted 7 lines
Quoted 2 lines
these tests found div64 bug in interpreter (already fixed) and another
cpu_to_be16bug in x64 JIT (fix is being worked on).Sorry, I applied V1 of this, and in fact I removed the double From:
when I applied it.I hope this is ok.
yes. thanks a lot!