mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 02:43:53 +08:00
kernel: bump 4.14 to 4.14.174
Refreshed all patches. Remove upstreamed: - 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch - 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch Fixes: - CVE-2020-8648 (potentially) - CVE-2020-8647 - CVE-2020-8649 Compile-tested on: cns3xxx, octeontx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
This commit is contained in:
parent
b463749015
commit
62e49562ed
@ -6,11 +6,11 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-4.14 = .173
|
||||
LINUX_VERSION-4.14 = .174
|
||||
LINUX_VERSION-4.19 = .113
|
||||
LINUX_VERSION-5.4 = .28
|
||||
|
||||
LINUX_KERNEL_HASH-4.14.173 = a282ad7a445dcfc7ff8939d18d55ee09e59f96d2aa96d05583483f155f1db74f
|
||||
LINUX_KERNEL_HASH-4.14.174 = 4c223ca3565d4267b403f7432860d87c8301767eb654d046d268782b18155189
|
||||
LINUX_KERNEL_HASH-4.19.113 = b5a0576d5f7e85aeeba4922fba8d9aa2c2a09cd6f48d07265999b890cf97c0e5
|
||||
LINUX_KERNEL_HASH-5.4.28 = c863cc1346348f9a40083b4bc0d34375117b1c401af920994d42e855653ef7a4
|
||||
|
||||
|
@ -55,7 +55,7 @@ Cc: Kir Kolyshkin <kir@openvz.org>
|
||||
rwlock_t sk_callback_lock;
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -2745,6 +2745,7 @@ void sock_init_data(struct socket *sock,
|
||||
@@ -2748,6 +2748,7 @@ void sock_init_data(struct socket *sock,
|
||||
|
||||
sk->sk_max_pacing_rate = ~0U;
|
||||
sk->sk_pacing_rate = ~0U;
|
||||
|
@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/net/batman-adv/bat_iv_ogm.c
|
||||
+++ b/net/batman-adv/bat_iv_ogm.c
|
||||
@@ -51,6 +51,7 @@
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <net/genetlink.h>
|
||||
#include <net/netlink.h>
|
||||
@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#include <uapi/linux/batman_adv.h>
|
||||
|
||||
#include "bat_algo.h"
|
||||
@@ -62,7 +63,6 @@
|
||||
@@ -63,7 +64,6 @@
|
||||
#include "netlink.h"
|
||||
#include "network-coding.h"
|
||||
#include "originator.h"
|
||||
@ -45,7 +45,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#include "translation-table.h"
|
||||
--- a/net/batman-adv/bat_v.c
|
||||
+++ b/net/batman-adv/bat_v.c
|
||||
@@ -37,6 +37,7 @@
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <net/genetlink.h>
|
||||
#include <net/netlink.h>
|
||||
@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#include <uapi/linux/batman_adv.h>
|
||||
|
||||
#include "bat_algo.h"
|
||||
@@ -49,7 +50,6 @@
|
||||
@@ -48,7 +49,6 @@
|
||||
#include "log.h"
|
||||
#include "netlink.h"
|
||||
#include "originator.h"
|
||||
@ -80,7 +80,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/net/batman-adv/bat_v_ogm.c
|
||||
+++ b/net/batman-adv/bat_v_ogm.c
|
||||
@@ -38,13 +38,13 @@
|
||||
@@ -40,13 +40,13 @@
|
||||
#include <linux/string.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/workqueue.h>
|
||||
@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
/**
|
||||
--- a/net/batman-adv/hard-interface.c
|
||||
+++ b/net/batman-adv/hard-interface.c
|
||||
@@ -36,6 +36,7 @@
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <net/net_namespace.h>
|
||||
#include <net/rtnetlink.h>
|
||||
@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
#include "bat_v.h"
|
||||
#include "bridge_loop_avoidance.h"
|
||||
@@ -44,7 +45,6 @@
|
||||
@@ -45,7 +46,6 @@
|
||||
#include "gateway_client.h"
|
||||
#include "log.h"
|
||||
#include "originator.h"
|
||||
@ -1025,7 +1025,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/net/batman-adv/types.h
|
||||
+++ b/net/batman-adv/types.h
|
||||
@@ -34,10 +34,9 @@
|
||||
@@ -35,10 +35,9 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/wait.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
@ -1,71 +0,0 @@
|
||||
From 82afdcd4ec3c8ca6551cbf7c43c09e2fd240487a Mon Sep 17 00:00:00 2001
|
||||
From: Hangbin Liu <liuhangbin@gmail.com>
|
||||
Date: Tue, 10 Mar 2020 15:27:37 +0800
|
||||
Subject: [PATCH] ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Rafał found an issue that for non-Ethernet interface, if we down and up
|
||||
frequently, the memory will be consumed slowly.
|
||||
|
||||
The reason is we add allnodes/allrouters addressed in multicast list in
|
||||
ipv6_add_dev(). When link down, we call ipv6_mc_down(), store all multicast
|
||||
addresses via mld_add_delrec(). But when link up, we don't call ipv6_mc_up()
|
||||
for non-Ethernet interface to remove the addresses. This makes idev->mc_tomb
|
||||
getting bigger and bigger. The call stack looks like:
|
||||
|
||||
addrconf_notify(NETDEV_REGISTER)
|
||||
ipv6_add_dev
|
||||
ipv6_dev_mc_inc(ff01::1)
|
||||
ipv6_dev_mc_inc(ff02::1)
|
||||
ipv6_dev_mc_inc(ff02::2)
|
||||
|
||||
addrconf_notify(NETDEV_UP)
|
||||
addrconf_dev_config
|
||||
/* Alas, we support only Ethernet autoconfiguration. */
|
||||
return;
|
||||
|
||||
addrconf_notify(NETDEV_DOWN)
|
||||
addrconf_ifdown
|
||||
ipv6_mc_down
|
||||
igmp6_group_dropped(ff02::2)
|
||||
mld_add_delrec(ff02::2)
|
||||
igmp6_group_dropped(ff02::1)
|
||||
igmp6_group_dropped(ff01::1)
|
||||
|
||||
After investigating, I can't found a rule to disable multicast on
|
||||
non-Ethernet interface. In RFC2460, the link could be Ethernet, PPP, ATM,
|
||||
tunnels, etc. In IPv4, it doesn't check the dev type when calls ip_mc_up()
|
||||
in inetdev_event(). Even for IPv6, we don't check the dev type and call
|
||||
ipv6_add_dev(), ipv6_dev_mc_inc() after register device.
|
||||
|
||||
So I think it's OK to fix this memory consumer by calling ipv6_mc_up() for
|
||||
non-Ethernet interface.
|
||||
|
||||
v2: Also check IFF_MULTICAST flag to make sure the interface supports
|
||||
multicast
|
||||
|
||||
Reported-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Tested-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
Fixes: 74235a25c673 ("[IPV6] addrconf: Fix IPv6 on tuntap tunnels")
|
||||
Fixes: 1666d49e1d41 ("mld: do not remove mld souce list info when set link down")
|
||||
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
|
||||
Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
---
|
||||
net/ipv6/addrconf.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/net/ipv6/addrconf.c
|
||||
+++ b/net/ipv6/addrconf.c
|
||||
@@ -3223,6 +3223,10 @@ static void addrconf_dev_config(struct n
|
||||
(dev->type != ARPHRD_TUNNEL) &&
|
||||
(dev->type != ARPHRD_NONE)) {
|
||||
/* Alas, we support only Ethernet autoconfiguration. */
|
||||
+ idev = __in6_dev_get(dev);
|
||||
+ if (!IS_ERR_OR_NULL(idev) && dev->flags & IFF_UP &&
|
||||
+ dev->flags & IFF_MULTICAST)
|
||||
+ ipv6_mc_up(idev);
|
||||
return;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/include/linux/phy.h
|
||||
+++ b/include/linux/phy.h
|
||||
@@ -547,6 +547,12 @@ struct phy_driver {
|
||||
@@ -549,6 +549,12 @@ struct phy_driver {
|
||||
/* Determines the negotiated speed and duplex */
|
||||
int (*read_status)(struct phy_device *phydev);
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
--- a/drivers/net/phy/phy_device.c
|
||||
+++ b/drivers/net/phy/phy_device.c
|
||||
@@ -1462,6 +1462,9 @@ int genphy_update_link(struct phy_device
|
||||
@@ -1466,6 +1466,9 @@ int genphy_update_link(struct phy_device
|
||||
{
|
||||
int status;
|
||||
|
||||
|
@ -327,7 +327,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/core/sock.c
|
||||
+++ b/net/core/sock.c
|
||||
@@ -3384,6 +3384,8 @@ static __net_initdata struct pernet_oper
|
||||
@@ -3387,6 +3387,8 @@ static __net_initdata struct pernet_oper
|
||||
|
||||
static int __init proto_init(void)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
if (!net_eq(dev_net(dev), sock_net(sk)))
|
||||
goto drop;
|
||||
|
||||
@@ -3301,6 +3303,7 @@ static int packet_create(struct net *net
|
||||
@@ -3302,6 +3304,7 @@ static int packet_create(struct net *net
|
||||
mutex_init(&po->pg_vec_lock);
|
||||
po->rollover = NULL;
|
||||
po->prot_hook.func = packet_rcv;
|
||||
@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
if (sock->type == SOCK_PACKET)
|
||||
po->prot_hook.func = packet_rcv_spkt;
|
||||
@@ -3923,6 +3926,16 @@ packet_setsockopt(struct socket *sock, i
|
||||
@@ -3924,6 +3927,16 @@ packet_setsockopt(struct socket *sock, i
|
||||
po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
|
||||
return 0;
|
||||
}
|
||||
@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
default:
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
@@ -3975,6 +3988,13 @@ static int packet_getsockopt(struct sock
|
||||
@@ -3976,6 +3989,13 @@ static int packet_getsockopt(struct sock
|
||||
case PACKET_VNET_HDR:
|
||||
val = po->has_vnet_hdr;
|
||||
break;
|
||||
|
@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
|
||||
--- a/drivers/net/phy/phy_device.c
|
||||
+++ b/drivers/net/phy/phy_device.c
|
||||
@@ -1106,6 +1106,9 @@ void phy_detach(struct phy_device *phyde
|
||||
@@ -1110,6 +1110,9 @@ void phy_detach(struct phy_device *phyde
|
||||
struct module *ndev_owner = dev->dev.parent->driver->owner;
|
||||
struct mii_bus *bus;
|
||||
|
||||
@ -23,7 +23,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
|
||||
sysfs_remove_link(&phydev->mdio.dev.kobj, "attached_dev");
|
||||
--- a/include/linux/phy.h
|
||||
+++ b/include/linux/phy.h
|
||||
@@ -559,6 +559,12 @@ struct phy_driver {
|
||||
@@ -561,6 +561,12 @@ struct phy_driver {
|
||||
*/
|
||||
int (*did_interrupt)(struct phy_device *phydev);
|
||||
|
||||
|
@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
|
||||
|
||||
--- a/drivers/net/phy/phy_device.c
|
||||
+++ b/drivers/net/phy/phy_device.c
|
||||
@@ -1944,7 +1944,7 @@ static struct phy_driver genphy_driver =
|
||||
@@ -1948,7 +1948,7 @@ static struct phy_driver genphy_driver =
|
||||
.config_init = genphy_config_init,
|
||||
.features = PHY_GBIT_FEATURES | SUPPORTED_MII |
|
||||
SUPPORTED_AUI | SUPPORTED_FIBRE |
|
||||
|
@ -49,8 +49,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
break;
|
||||
--- a/include/linux/phy.h
|
||||
+++ b/include/linux/phy.h
|
||||
@@ -412,6 +412,7 @@ struct phy_device {
|
||||
bool suspended;
|
||||
@@ -414,6 +414,7 @@ struct phy_device {
|
||||
bool suspended_by_mdio_bus;
|
||||
bool sysfs_links;
|
||||
bool loopback_enabled;
|
||||
+ bool no_auto_carrier_off;
|
||||
|
Loading…
x
Reference in New Issue
Block a user