aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-12-18 10:49:22 -0500
committerDavid S. Miller <davem@davemloft.net>2017-12-18 10:49:22 -0500
commitb36025b19a2301ba0cac05e6ffad5668013d2c77 (patch)
tree2fff4e78df48f5d9af54b35d9aa4aa8dd1494188 /tools
parentf870c1ff65a6d1f3a083f277280802ee09a5b44d (diff)
parentc1b08ebe5003ae291470cb6e26923628ab19606f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Daniel Borkmann says: ==================== pull-request: bpf 2017-12-17 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) Fix a corner case in generic XDP where we have non-linear skbs but enough tailroom in the skb to not miss to linearizing there, from Song. 2) Fix BPF JIT bugs in s390x and ppc64 to not recache skb data when BPF context is not skb, from Daniel. 3) Fix a BPF JIT bug in sparc64 where recaching skb data after helper call would use the wrong register for the skb, from Daniel. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/test_verifier.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index 3c64f30cf63c..b03ecfd7185b 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -6117,6 +6117,30 @@ static struct bpf_test tests[] = {
6117 .result = ACCEPT, 6117 .result = ACCEPT,
6118 }, 6118 },
6119 { 6119 {
6120 "ld_abs: tests on r6 and skb data reload helper",
6121 .insns = {
6122 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1),
6123 BPF_LD_ABS(BPF_B, 0),
6124 BPF_LD_ABS(BPF_H, 0),
6125 BPF_LD_ABS(BPF_W, 0),
6126 BPF_MOV64_REG(BPF_REG_7, BPF_REG_6),
6127 BPF_MOV64_IMM(BPF_REG_6, 0),
6128 BPF_MOV64_REG(BPF_REG_1, BPF_REG_7),
6129 BPF_MOV64_IMM(BPF_REG_2, 1),
6130 BPF_MOV64_IMM(BPF_REG_3, 2),
6131 BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
6132 BPF_FUNC_skb_vlan_push),
6133 BPF_MOV64_REG(BPF_REG_6, BPF_REG_7),
6134 BPF_LD_ABS(BPF_B, 0),
6135 BPF_LD_ABS(BPF_H, 0),
6136 BPF_LD_ABS(BPF_W, 0),
6137 BPF_MOV64_IMM(BPF_REG_0, 42),
6138 BPF_EXIT_INSN(),
6139 },
6140 .prog_type = BPF_PROG_TYPE_SCHED_CLS,
6141 .result = ACCEPT,
6142 },
6143 {
6120 "ld_ind: check calling conv, r1", 6144 "ld_ind: check calling conv, r1",
6121 .insns = { 6145 .insns = {
6122 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), 6146 BPF_MOV64_REG(BPF_REG_6, BPF_REG_1),