summaryrefslogtreecommitdiff
path: root/target/linux/brcm2708/patches-4.4
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-04-24 11:32:17 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2016-04-24 11:32:17 +0200
commit3faf65e92857aa5466791da3ec623c23af1f8130 (patch)
treeca061d6344359212f269020d2b6c8543cd15054c /target/linux/brcm2708/patches-4.4
parent4c60a6f803759105d59b3e1fc52a9e37eecd08cd (diff)
downloadmtk-20170518-3faf65e92857aa5466791da3ec623c23af1f8130.zip
mtk-20170518-3faf65e92857aa5466791da3ec623c23af1f8130.tar.gz
mtk-20170518-3faf65e92857aa5466791da3ec623c23af1f8130.tar.bz2
kernel: update kernel 4.4 to version 4.4.8
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4')
-rw-r--r--target/linux/brcm2708/patches-4.4/0069-hid-Reduce-default-mouse-polling-interval-to-60Hz.patch2
-rw-r--r--target/linux/brcm2708/patches-4.4/0222-net-fix-bridge-multicast-packet-checksum-validation.patch75
-rw-r--r--target/linux/brcm2708/patches-4.4/0223-bpf-add-skb_postpush_rcsum-and-fix-dev_forward_skb-o.patch124
3 files changed, 1 insertions, 200 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0069-hid-Reduce-default-mouse-polling-interval-to-60Hz.patch b/target/linux/brcm2708/patches-4.4/0069-hid-Reduce-default-mouse-polling-interval-to-60Hz.patch
index e269150..c292692 100644
--- a/target/linux/brcm2708/patches-4.4/0069-hid-Reduce-default-mouse-polling-interval-to-60Hz.patch
+++ b/target/linux/brcm2708/patches-4.4/0069-hid-Reduce-default-mouse-polling-interval-to-60Hz.patch
@@ -19,7 +19,7 @@ Reduces overhead when using X
module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644);
MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
-@@ -1091,8 +1091,12 @@ static int usbhid_start(struct hid_devic
+@@ -1083,8 +1083,12 @@ static int usbhid_start(struct hid_devic
}
/* Change the polling interval of mice. */
diff --git a/target/linux/brcm2708/patches-4.4/0222-net-fix-bridge-multicast-packet-checksum-validation.patch b/target/linux/brcm2708/patches-4.4/0222-net-fix-bridge-multicast-packet-checksum-validation.patch
deleted file mode 100644
index b3f105b..0000000
--- a/target/linux/brcm2708/patches-4.4/0222-net-fix-bridge-multicast-packet-checksum-validation.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 966e306c7690f118bedf2f5de94e22e487bd39ec Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@c0d3.blue>
-Date: Wed, 24 Feb 2016 04:21:42 +0100
-Subject: [PATCH 222/232] net: fix bridge multicast packet checksum validation
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-We need to update the skb->csum after pulling the skb, otherwise
-an unnecessary checksum (re)computation can ocure for IGMP/MLD packets
-in the bridge code. Additionally this fixes the following splats for
-network devices / bridge ports with support for and enabled RX checksum
-offloading:
-
-[...]
-[ 43.986968] eth0: hw csum failure
-[ 43.990344] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.4.0 #2
-[ 43.996193] Hardware name: BCM2709
-[ 43.999647] [<800204e0>] (unwind_backtrace) from [<8001cf14>] (show_stack+0x10/0x14)
-[ 44.007432] [<8001cf14>] (show_stack) from [<801ab614>] (dump_stack+0x80/0x90)
-[ 44.014695] [<801ab614>] (dump_stack) from [<802e4548>] (__skb_checksum_complete+0x6c/0xac)
-[ 44.023090] [<802e4548>] (__skb_checksum_complete) from [<803a055c>] (ipv6_mc_validate_checksum+0x104/0x178)
-[ 44.032959] [<803a055c>] (ipv6_mc_validate_checksum) from [<802e111c>] (skb_checksum_trimmed+0x130/0x188)
-[ 44.042565] [<802e111c>] (skb_checksum_trimmed) from [<803a06e8>] (ipv6_mc_check_mld+0x118/0x338)
-[ 44.051501] [<803a06e8>] (ipv6_mc_check_mld) from [<803b2c98>] (br_multicast_rcv+0x5dc/0xd00)
-[ 44.060077] [<803b2c98>] (br_multicast_rcv) from [<803aa510>] (br_handle_frame_finish+0xac/0x51c)
-[...]
-
-Fixes: 9afd85c9e455 ("net: Export IGMP/MLD message validation code")
-Reported-by: Álvaro Fernández Rojas <noltari@gmail.com>
-Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- net/core/skbuff.c | 22 ++++++++++++++++++++--
- 1 file changed, 20 insertions(+), 2 deletions(-)
-
---- a/net/core/skbuff.c
-+++ b/net/core/skbuff.c
-@@ -2965,6 +2965,24 @@ int skb_append_pagefrags(struct sk_buff
- EXPORT_SYMBOL_GPL(skb_append_pagefrags);
-
- /**
-+ * skb_push_rcsum - push skb and update receive checksum
-+ * @skb: buffer to update
-+ * @len: length of data pulled
-+ *
-+ * This function performs an skb_push on the packet and updates
-+ * the CHECKSUM_COMPLETE checksum. It should be used on
-+ * receive path processing instead of skb_push unless you know
-+ * that the checksum difference is zero (e.g., a valid IP header)
-+ * or you are setting ip_summed to CHECKSUM_NONE.
-+ */
-+static unsigned char *skb_push_rcsum(struct sk_buff *skb, unsigned len)
-+{
-+ skb_push(skb, len);
-+ skb_postpush_rcsum(skb, skb->data, len);
-+ return skb->data;
-+}
-+
-+/**
- * skb_pull_rcsum - pull skb and update receive checksum
- * @skb: buffer to update
- * @len: length of data pulled
-@@ -4101,9 +4119,9 @@ struct sk_buff *skb_checksum_trimmed(str
- if (!pskb_may_pull(skb_chk, offset))
- goto err;
-
-- __skb_pull(skb_chk, offset);
-+ skb_pull_rcsum(skb_chk, offset);
- ret = skb_chkf(skb_chk);
-- __skb_push(skb_chk, offset);
-+ skb_push_rcsum(skb_chk, offset);
-
- if (ret)
- goto err;
diff --git a/target/linux/brcm2708/patches-4.4/0223-bpf-add-skb_postpush_rcsum-and-fix-dev_forward_skb-o.patch b/target/linux/brcm2708/patches-4.4/0223-bpf-add-skb_postpush_rcsum-and-fix-dev_forward_skb-o.patch
deleted file mode 100644
index 1793d5e..0000000
--- a/target/linux/brcm2708/patches-4.4/0223-bpf-add-skb_postpush_rcsum-and-fix-dev_forward_skb-o.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 7ce01cd3013b7c9f1b257a6033b6d1f67fed5b5c Mon Sep 17 00:00:00 2001
-From: Daniel Borkmann <daniel@iogearbox.net>
-Date: Thu, 7 Jan 2016 15:50:23 +0100
-Subject: [PATCH 223/232] 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] <IRQ> [<ffffffff81372f08>] dump_stack+0x44/0x5c
- [ 505.144134] [<ffffffff81607cea>] netdev_rx_csum_fault+0x3a/0x40
- [ 505.144142] [<ffffffff815fee3f>] __skb_checksum_complete+0xcf/0xe0
- [ 505.144149] [<ffffffff816f0902>] nf_ip6_checksum+0xb2/0x120
- [ 505.144161] [<ffffffffa08c0e0e>] icmpv6_error+0x17e/0x328 [nf_conntrack_ipv6]
- [ 505.144170] [<ffffffffa0898eca>] ? ip6t_do_table+0x2fa/0x645 [ip6_tables]
- [ 505.144177] [<ffffffffa08c0725>] ? ipv6_get_l4proto+0x65/0xd0 [nf_conntrack_ipv6]
- [ 505.144189] [<ffffffffa06c9a12>] nf_conntrack_in+0xc2/0x5a0 [nf_conntrack]
- [ 505.144196] [<ffffffffa08c039c>] ipv6_conntrack_in+0x1c/0x20 [nf_conntrack_ipv6]
- [ 505.144204] [<ffffffff8164385d>] nf_iterate+0x5d/0x70
- [ 505.144210] [<ffffffff816438d6>] nf_hook_slow+0x66/0xc0
- [ 505.144218] [<ffffffff816bd302>] ipv6_rcv+0x3f2/0x4f0
- [ 505.144225] [<ffffffff816bca40>] ? ip6_make_skb+0x1b0/0x1b0
- [ 505.144232] [<ffffffff8160b77b>] __netif_receive_skb_core+0x36b/0x9a0
- [ 505.144239] [<ffffffff8160bdc8>] ? __netif_receive_skb+0x18/0x60
- [ 505.144245] [<ffffffff8160bdc8>] __netif_receive_skb+0x18/0x60
- [ 505.144252] [<ffffffff8160ccff>] process_backlog+0x9f/0x140
- [ 505.144259] [<ffffffff8160c4a5>] 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 <daniel@iogearbox.net>
-Acked-by: Alexei Starovoitov <ast@kernel.org>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
- include/linux/skbuff.h | 17 +++++++++++++++++
- net/core/filter.c | 17 +++++++++++++----
- 2 files changed, 30 insertions(+), 4 deletions(-)
-
---- a/include/linux/skbuff.h
-+++ b/include/linux/skbuff.h
-@@ -2737,6 +2737,23 @@ static inline void skb_postpull_rcsum(st
-
- unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len);
-
-+static inline void skb_postpush_rcsum(struct sk_buff *skb,
-+ const void *start, unsigned int len)
-+{
-+ /* For performing the reverse operation to skb_postpull_rcsum(),
-+ * we can instead of ...
-+ *
-+ * skb->csum = csum_add(skb->csum, csum_partial(start, len, 0));
-+ *
-+ * ... just use this equivalent version here to save a few
-+ * instructions. Feeding csum of 0 in csum_partial() and later
-+ * on adding skb->csum is equivalent to feed skb->csum in the
-+ * first place.
-+ */
-+ if (skb->ip_summed == CHECKSUM_COMPLETE)
-+ skb->csum = csum_partial(start, len, skb->csum);
-+}
-+
- /**
- * pskb_trim_rcsum - trim received skb and update checksum
- * @skb: buffer to trim
---- a/net/core/filter.c
-+++ b/net/core/filter.c
-@@ -1288,8 +1288,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);