diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-14 21:07:24 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2017-12-15 09:19:35 -0800 |
commit | 87338c8e2cbb317b5f757e6172f94e2e3799cd20 (patch) | |
tree | 5190b98815efc7a2c96a8a49c3b443ab9565fcc5 /CREDITS | |
parent | 6d59b7dbf72ed20d0138e2f9b75ca3d4a9d4faca (diff) | |
download | linux-87338c8e2cbb317b5f757e6172f94e2e3799cd20.tar.gz linux-87338c8e2cbb317b5f757e6172f94e2e3799cd20.tar.bz2 linux-87338c8e2cbb317b5f757e6172f94e2e3799cd20.zip |
bpf, ppc64: 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 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.
Fixes: 156d0e290e96 ("powerpc/ebpf/jit: Implement JIT compiler for extended BPF")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: Sandipan Das <sandipan@linux.vnet.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions