From: Daniel Borkmann Date: Wed, 24 May 2017 23:05:07 +0000 (+0200) Subject: bpf: add bpf_clone_redirect to bpf_helper_changes_pkt_data X-Git-Tag: v4.11.4~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6d2860eeefbbf574288b556bb3b17df3ad2f824;p=thirdparty%2Fkernel%2Fstable.git bpf: add bpf_clone_redirect to bpf_helper_changes_pkt_data [ Upstream commit 41703a731066fde79c3e5ccf3391cf77a98aeda5 ] The bpf_clone_redirect() still needs to be listed in bpf_helper_changes_pkt_data() since we call into bpf_try_make_head_writable() from there, thus we need to invalidate prior pkt regs as well. Fixes: 36bbef52c7eb ("bpf: direct packet write and access for helpers for clsact progs") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/core/filter.c b/net/core/filter.c index ebaeaf2e46e8b..6ca3b05eb6270 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -2266,6 +2266,7 @@ bool bpf_helper_changes_pkt_data(void *func) func == bpf_skb_change_head || func == bpf_skb_change_tail || func == bpf_skb_pull_data || + func == bpf_clone_redirect || func == bpf_l3_csum_replace || func == bpf_l4_csum_replace || func == bpf_xdp_adjust_head)