aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/net
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2017-12-14 21:07:23 +0100
committerAlexei Starovoitov <ast@kernel.org>2017-12-15 09:19:35 -0800
commit6d59b7dbf72ed20d0138e2f9b75ca3d4a9d4faca (patch)
treeb9781d7d7d52ec54a68e5e70036f181db4603cc6 /arch/powerpc/net
parentxdp: linearize skb in netif_receive_generic_xdp() (diff)
downloadlinux-dev-6d59b7dbf72ed20d0138e2f9b75ca3d4a9d4faca.tar.xz
linux-dev-6d59b7dbf72ed20d0138e2f9b75ca3d4a9d4faca.zip
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 'arch/powerpc/net')
0 files changed, 0 insertions, 0 deletions