diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2017-10-17 01:40:56 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-18 15:17:11 +0200 |
commit | 29d1b33a2e0a3288374102b004a15cb278a2303e (patch) | |
tree | 7e497a6e77e7b929801554eedfc4ea1b431d1e22 /net/core | |
parent | bpf: move knowledge about post-translation offsets out of verifier (diff) | |
download | linux-29d1b33a2e0a3288374102b004a15cb278a2303e.tar.xz linux-29d1b33a2e0a3288374102b004a15cb278a2303e.zip |
bpf: allow access to skb->len from offloads
Since we are now doing strict checking of what offloads
may access, make sure skb->len is on that list.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/filter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/filter.c b/net/core/filter.c index 7373a08fbef7..09e011f20291 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -3738,6 +3738,8 @@ tc_cls_act_is_valid_access_analyzer(int off, int size, struct bpf_insn_access_aux *info) { switch (off) { + case offsetof(struct sk_buff, len): + return true; case offsetof(struct sk_buff, data): info->reg_type = PTR_TO_PACKET; return true; |