From 2b1c6b21b5e6c82ebb55d7fb7df90e60e88cbb14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 10 Sep 2016 14:54:26 +0200 Subject: brcm2708: update linux 4.4 patches to latest version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As usual these patches were extracted and rebased from the raspberry pi repo: https://github.com/raspberrypi/linux/tree/rpi-4.4.y Also adds support for Raspberry Pi Compute Module 3 (untested). Signed-off-by: Álvaro Fernández Rojas --- ..._postpush_rcsum-and-fix-dev_forward_skb-o.patch | 97 ---------------------- 1 file changed, 97 deletions(-) delete mode 100644 target/linux/brcm2708/patches-4.4/0221-bpf-add-skb_postpush_rcsum-and-fix-dev_forward_skb-o.patch (limited to 'target/linux/brcm2708/patches-4.4/0221-bpf-add-skb_postpush_rcsum-and-fix-dev_forward_skb-o.patch') diff --git a/target/linux/brcm2708/patches-4.4/0221-bpf-add-skb_postpush_rcsum-and-fix-dev_forward_skb-o.patch b/target/linux/brcm2708/patches-4.4/0221-bpf-add-skb_postpush_rcsum-and-fix-dev_forward_skb-o.patch deleted file mode 100644 index ee8548f553..0000000000 --- a/target/linux/brcm2708/patches-4.4/0221-bpf-add-skb_postpush_rcsum-and-fix-dev_forward_skb-o.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 367956e87b62ae1f015ccbff58c7920a2e7a3511 Mon Sep 17 00:00:00 2001 -From: Daniel Borkmann -Date: Thu, 7 Jan 2016 15:50:23 +0100 -Subject: [PATCH 221/423] bpf: add skb_postpush_rcsum and fix dev_forward_skb - occasions - -Add a small helper skb_postpush_rcsum() and fix up redirect locations -that need CHECKSUM_COMPLETE fixups on ingress. dev_forward_skb() expects -a proper csum that covers also Ethernet header, f.e. since 2c26d34bbcc0 -("net/core: Handle csum for CHECKSUM_COMPLETE VXLAN forwarding"), we -also do skb_postpull_rcsum() after pulling Ethernet header off via -eth_type_trans(). - -When using eBPF in a netns setup f.e. with vxlan in collect metadata mode, -I can trigger the following csum issue with an IPv6 setup: - - [ 505.144065] dummy1: hw csum failure - [...] - [ 505.144108] Call Trace: - [ 505.144112] [] dump_stack+0x44/0x5c - [ 505.144134] [] netdev_rx_csum_fault+0x3a/0x40 - [ 505.144142] [] __skb_checksum_complete+0xcf/0xe0 - [ 505.144149] [] nf_ip6_checksum+0xb2/0x120 - [ 505.144161] [] icmpv6_error+0x17e/0x328 [nf_conntrack_ipv6] - [ 505.144170] [] ? ip6t_do_table+0x2fa/0x645 [ip6_tables] - [ 505.144177] [] ? ipv6_get_l4proto+0x65/0xd0 [nf_conntrack_ipv6] - [ 505.144189] [] nf_conntrack_in+0xc2/0x5a0 [nf_conntrack] - [ 505.144196] [] ipv6_conntrack_in+0x1c/0x20 [nf_conntrack_ipv6] - [ 505.144204] [] nf_iterate+0x5d/0x70 - [ 505.144210] [] nf_hook_slow+0x66/0xc0 - [ 505.144218] [] ipv6_rcv+0x3f2/0x4f0 - [ 505.144225] [] ? ip6_make_skb+0x1b0/0x1b0 - [ 505.144232] [] __netif_receive_skb_core+0x36b/0x9a0 - [ 505.144239] [] ? __netif_receive_skb+0x18/0x60 - [ 505.144245] [] __netif_receive_skb+0x18/0x60 - [ 505.144252] [] process_backlog+0x9f/0x140 - [ 505.144259] [] net_rx_action+0x145/0x320 - [...] - -What happens is that on ingress, we push Ethernet header back in, either -from cls_bpf or right before skb_do_redirect(), but without updating csum. -The "hw csum failure" can be fixed by using the new skb_postpush_rcsum() -helper for the dev_forward_skb() case to correct the csum diff again. - -Thanks to Hannes Frederic Sowa for the csum_partial() idea! - -Fixes: 3896d655f4d4 ("bpf: introduce bpf_clone_redirect() helper") -Fixes: 27b29f63058d ("bpf: add bpf_redirect() helper") -Signed-off-by: Daniel Borkmann -Acked-by: Alexei Starovoitov -Signed-off-by: David S. Miller ---- - net/core/filter.c | 17 +++++++++++++---- - 1 file changed, 13 insertions(+), 4 deletions(-) - ---- a/net/core/filter.c -+++ b/net/core/filter.c -@@ -1291,8 +1291,9 @@ static u64 bpf_skb_store_bytes(u64 r1, u - /* skb_store_bits cannot return -EFAULT here */ - skb_store_bits(skb, offset, ptr, len); - -- if (BPF_RECOMPUTE_CSUM(flags) && skb->ip_summed == CHECKSUM_COMPLETE) -- skb->csum = csum_add(skb->csum, csum_partial(ptr, len, 0)); -+ if (BPF_RECOMPUTE_CSUM(flags)) -+ skb_postpush_rcsum(skb, ptr, len); -+ - return 0; - } - -@@ -1415,8 +1416,12 @@ static u64 bpf_clone_redirect(u64 r1, u6 - if (unlikely(!skb2)) - return -ENOMEM; - -- if (BPF_IS_REDIRECT_INGRESS(flags)) -+ if (BPF_IS_REDIRECT_INGRESS(flags)) { -+ if (skb_at_tc_ingress(skb2)) -+ skb_postpush_rcsum(skb2, skb_mac_header(skb2), -+ skb2->mac_len); - return dev_forward_skb(dev, skb2); -+ } - - skb2->dev = dev; - skb_sender_cpu_clear(skb2); -@@ -1459,8 +1464,12 @@ int skb_do_redirect(struct sk_buff *skb) - return -EINVAL; - } - -- if (BPF_IS_REDIRECT_INGRESS(ri->flags)) -+ if (BPF_IS_REDIRECT_INGRESS(ri->flags)) { -+ if (skb_at_tc_ingress(skb)) -+ skb_postpush_rcsum(skb, skb_mac_header(skb), -+ skb->mac_len); - return dev_forward_skb(dev, skb); -+ } - - skb->dev = dev; - skb_sender_cpu_clear(skb); -- cgit v1.2.3