diff options
author | Daniel Borkmann <[email protected]> | 2017-12-14 21:07:23 +0100 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2017-12-15 09:19:35 -0800 |
commit | 6d59b7dbf72ed20d0138e2f9b75ca3d4a9d4faca (patch) | |
tree | b9781d7d7d52ec54a68e5e70036f181db4603cc6 /net/unix/sysctl_net_unix.c | |
parent | 2d17d8d79e77ff3f1b35b87522fc72fa562260ff (diff) |
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 <[email protected]>
Acked-by: Alexei Starovoitov <[email protected]>
Cc: Michael Holzheu <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions