summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAlexei Starovoitov2019-07-23 23:12:38 +0200
committerAlexei Starovoitov2019-07-23 23:12:38 +0200
commit7c8b87f012614697596b78841c0d0b1520b1f88a (patch)
tree1aaff1884ece785915c25780bd7d2f5666c5e941 /tools
parentbpf: fix narrower loads on s390 (diff)
parentselftests/bpf: add another gso_segs access (diff)
downloadkernel-qcow2-linux-7c8b87f012614697596b78841c0d0b1520b1f88a.tar.gz
kernel-qcow2-linux-7c8b87f012614697596b78841c0d0b1520b1f88a.tar.xz
kernel-qcow2-linux-7c8b87f012614697596b78841c0d0b1520b1f88a.zip
Merge branch 'fix-gso_segs'
Eric Dumazet says: ==================== First patch changes the kernel, second patch adds a new test. Note that other patches might be needed to take care of similar issues in sock_ops_convert_ctx_access() and SOCK_OPS_GET_FIELD() ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/verifier/ctx_skb.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/verifier/ctx_skb.c b/tools/testing/selftests/bpf/verifier/ctx_skb.c
index b0fda2877119..d438193804b2 100644
--- a/tools/testing/selftests/bpf/verifier/ctx_skb.c
+++ b/tools/testing/selftests/bpf/verifier/ctx_skb.c
@@ -975,6 +975,17 @@
.prog_type = BPF_PROG_TYPE_CGROUP_SKB,
},
{
+ "read gso_segs from CGROUP_SKB",
+ .insns = {
+ BPF_LDX_MEM(BPF_W, BPF_REG_1, BPF_REG_1,
+ offsetof(struct __sk_buff, gso_segs)),
+ BPF_MOV64_IMM(BPF_REG_0, 0),
+ BPF_EXIT_INSN(),
+ },
+ .result = ACCEPT,
+ .prog_type = BPF_PROG_TYPE_CGROUP_SKB,
+},
+{
"write gso_segs from CGROUP_SKB",
.insns = {
BPF_MOV64_IMM(BPF_REG_0, 0),