diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-14 23:07:23 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2017-12-15 20:19:35 +0300 |
commit | 6d59b7dbf72ed20d0138e2f9b75ca3d4a9d4faca (patch) | |
tree | b9781d7d7d52ec54a68e5e70036f181db4603cc6 /fs/befs | |
parent | 2d17d8d79e77ff3f1b35b87522fc72fa562260ff (diff) | |
download | linux-6d59b7dbf72ed20d0138e2f9b75ca3d4a9d4faca.tar.xz |
bpf, s390x: do not reload skb pointers in non-skb context
The assumption of unconditionally reloading skb pointers on
BPF helper calls where bpf_helper_changes_pkt_data() holds
true is wrong. There can be different contexts where the
BPF helper would enforce a reload such as in case of XDP.
Here, we do have a struct xdp_buff instead of struct sk_buff
as context, thus this will access garbage.
JITs only ever need to deal with cached skb pointer reload
when ld_abs/ind was seen, therefore guard the reload behind
SEEN_SKB only. Tested on s390x.
Fixes: 9db7f2b81880 ("s390/bpf: recache skb->data/hlen for skb_vlan_push/pop")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'fs/befs')
0 files changed, 0 insertions, 0 deletions