kernel: bump 4.14 to 4.14.173
Refreshed all patches. Remove upstreamed: - 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.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
640cd1bec4
commit
7dedc8bfb5
@ -6,11 +6,11 @@ ifdef CONFIG_TESTING_KERNEL
|
||||
KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
|
||||
endif
|
||||
|
||||
LINUX_VERSION-4.14 = .172
|
||||
LINUX_VERSION-4.14 = .173
|
||||
LINUX_VERSION-4.19 = .108
|
||||
LINUX_VERSION-5.4 = .24
|
||||
|
||||
LINUX_KERNEL_HASH-4.14.172 = 2318a1ab937580a079351ed20557c336a3d95b664f667b14e3ba49e3271b217a
|
||||
LINUX_KERNEL_HASH-4.14.173 = a282ad7a445dcfc7ff8939d18d55ee09e59f96d2aa96d05583483f155f1db74f
|
||||
LINUX_KERNEL_HASH-4.19.108 = 09aeeca5b08efea2f54b977b2999afb60d42f93b9f65b2b0111969f183f750a3
|
||||
LINUX_KERNEL_HASH-5.4.24 = 7fa0ac784c78129beed43260a7a22a077f1041ac0e8e88647284d2cf7b1d7eb3
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
};
|
||||
--- a/net/netfilter/nf_conntrack_core.c
|
||||
+++ b/net/netfilter/nf_conntrack_core.c
|
||||
@@ -960,6 +960,9 @@ static unsigned int early_drop_list(stru
|
||||
@@ -974,6 +974,9 @@ static unsigned int early_drop_list(stru
|
||||
hlist_nulls_for_each_entry_rcu(h, n, head, hnnode) {
|
||||
tmp = nf_ct_tuplehash_to_ctrack(h);
|
||||
|
||||
@ -57,7 +57,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
if (nf_ct_is_expired(tmp)) {
|
||||
nf_ct_gc_expired(tmp);
|
||||
continue;
|
||||
@@ -1037,6 +1040,18 @@ static bool gc_worker_can_early_drop(con
|
||||
@@ -1051,6 +1054,18 @@ static bool gc_worker_can_early_drop(con
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
||||
static void gc_worker(struct work_struct *work)
|
||||
{
|
||||
unsigned int min_interval = max(HZ / GC_MAX_BUCKETS_DIV, 1u);
|
||||
@@ -1073,6 +1088,11 @@ static void gc_worker(struct work_struct
|
||||
@@ -1087,6 +1102,11 @@ static void gc_worker(struct work_struct
|
||||
tmp = nf_ct_tuplehash_to_ctrack(h);
|
||||
|
||||
scanned++;
|
||||
|
||||
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/netfilter/nf_conntrack_core.c
|
||||
+++ b/net/netfilter/nf_conntrack_core.c
|
||||
@@ -1040,18 +1040,6 @@ static bool gc_worker_can_early_drop(con
|
||||
@@ -1054,18 +1054,6 @@ static bool gc_worker_can_early_drop(con
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static void gc_worker(struct work_struct *work)
|
||||
{
|
||||
unsigned int min_interval = max(HZ / GC_MAX_BUCKETS_DIV, 1u);
|
||||
@@ -1088,10 +1076,8 @@ static void gc_worker(struct work_struct
|
||||
@@ -1102,10 +1090,8 @@ static void gc_worker(struct work_struct
|
||||
tmp = nf_ct_tuplehash_to_ctrack(h);
|
||||
|
||||
scanned++;
|
||||
|
||||
@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
|
||||
--- a/drivers/tty/serial/8250/8250_exar.c
|
||||
+++ b/drivers/tty/serial/8250/8250_exar.c
|
||||
@@ -275,8 +275,32 @@ static int xr17v35x_register_gpio(struct
|
||||
@@ -283,8 +283,32 @@ static int xr17v35x_register_gpio(struct
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
};
|
||||
|
||||
static int iot2040_rs485_config(struct uart_port *port,
|
||||
@@ -309,19 +333,7 @@ static int iot2040_rs485_config(struct u
|
||||
@@ -317,19 +341,7 @@ static int iot2040_rs485_config(struct u
|
||||
value |= mode;
|
||||
writeb(value, p + UART_EXAR_MPIOLVL_7_0);
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
cfg->fc_flags |= RTF_REJECT;
|
||||
|
||||
if (rtm->rtm_type == RTN_LOCAL)
|
||||
@@ -3514,6 +3548,9 @@ static int rt6_fill_node(struct net *net
|
||||
@@ -3515,6 +3549,9 @@ static int rt6_fill_node(struct net *net
|
||||
case -EACCES:
|
||||
rtm->rtm_type = RTN_PROHIBIT;
|
||||
break;
|
||||
@ -191,7 +191,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
case -EAGAIN:
|
||||
rtm->rtm_type = RTN_THROW;
|
||||
break;
|
||||
@@ -3832,6 +3869,8 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -3833,6 +3870,8 @@ static int ip6_route_dev_notify(struct n
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
net->ipv6.ip6_prohibit_entry->dst.dev = dev;
|
||||
net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
|
||||
@ -200,7 +200,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
|
||||
net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
|
||||
#endif
|
||||
@@ -3843,6 +3882,7 @@ static int ip6_route_dev_notify(struct n
|
||||
@@ -3844,6 +3883,7 @@ static int ip6_route_dev_notify(struct n
|
||||
in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
|
||||
@ -208,7 +208,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
|
||||
#endif
|
||||
}
|
||||
@@ -4059,6 +4099,17 @@ static int __net_init ip6_route_net_init
|
||||
@@ -4060,6 +4100,17 @@ static int __net_init ip6_route_net_init
|
||||
net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
|
||||
dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
|
||||
ip6_template_metrics, true);
|
||||
@ -226,7 +226,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
#endif
|
||||
|
||||
net->ipv6.sysctl.flush_delay = 0;
|
||||
@@ -4077,6 +4128,8 @@ out:
|
||||
@@ -4078,6 +4129,8 @@ out:
|
||||
return ret;
|
||||
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
@ -235,7 +235,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
out_ip6_prohibit_entry:
|
||||
kfree(net->ipv6.ip6_prohibit_entry);
|
||||
out_ip6_null_entry:
|
||||
@@ -4094,6 +4147,7 @@ static void __net_exit ip6_route_net_exi
|
||||
@@ -4095,6 +4148,7 @@ static void __net_exit ip6_route_net_exi
|
||||
#ifdef CONFIG_IPV6_MULTIPLE_TABLES
|
||||
kfree(net->ipv6.ip6_prohibit_entry);
|
||||
kfree(net->ipv6.ip6_blk_hole_entry);
|
||||
@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
|
||||
#endif
|
||||
dst_entries_destroy(&net->ipv6.ip6_dst_ops);
|
||||
}
|
||||
@@ -4167,6 +4221,9 @@ void __init ip6_route_init_special_entri
|
||||
@@ -4168,6 +4222,9 @@ void __init ip6_route_init_special_entri
|
||||
init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
|
||||
init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
|
||||
init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
|
||||
|
||||
@ -1289,7 +1289,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
|
||||
xhci->quirks |= XHCI_BROKEN_PORT_PED;
|
||||
--- a/drivers/usb/host/xhci-ring.c
|
||||
+++ b/drivers/usb/host/xhci-ring.c
|
||||
@@ -1972,10 +1972,12 @@ static int finish_td(struct xhci_hcd *xh
|
||||
@@ -1978,10 +1978,12 @@ static int finish_td(struct xhci_hcd *xh
|
||||
union xhci_trb *ep_trb, struct xhci_transfer_event *event,
|
||||
struct xhci_virt_ep *ep, int *status)
|
||||
{
|
||||
@ -1302,7 +1302,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
|
||||
u32 trb_comp_code;
|
||||
int ep_index;
|
||||
|
||||
@@ -1998,14 +2000,30 @@ static int finish_td(struct xhci_hcd *xh
|
||||
@@ -2004,14 +2006,30 @@ static int finish_td(struct xhci_hcd *xh
|
||||
if (trb_comp_code == COMP_STALL_ERROR ||
|
||||
xhci_requires_manual_halt_cleanup(xhci, ep_ctx,
|
||||
trb_comp_code)) {
|
||||
|
||||
@ -27,7 +27,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
};
|
||||
|
||||
static struct bgx *bgx_vnic[MAX_BGX_THUNDER];
|
||||
@@ -841,12 +842,12 @@ static void bgx_poll_for_link(struct wor
|
||||
@@ -850,12 +851,12 @@ static void bgx_poll_for_link(struct wor
|
||||
queue_delayed_work(lmac->check_link, &lmac->dwork, HZ * 2);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
|
||||
return PHY_INTERFACE_MODE_SGMII;
|
||||
}
|
||||
@@ -912,7 +913,8 @@ static int bgx_lmac_enable(struct bgx *b
|
||||
@@ -921,7 +922,8 @@ static int bgx_lmac_enable(struct bgx *b
|
||||
|
||||
if (phy_connect_direct(&lmac->netdev, lmac->phydev,
|
||||
bgx_lmac_handler,
|
||||
@ -52,7 +52,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
return -ENODEV;
|
||||
|
||||
phy_start(lmac->phydev);
|
||||
@@ -1287,6 +1289,8 @@ static int bgx_init_of_phy(struct bgx *b
|
||||
@@ -1296,6 +1298,8 @@ static int bgx_init_of_phy(struct bgx *b
|
||||
bgx->lmac[lmac].lmacid = lmac;
|
||||
|
||||
phy_np = of_parse_phandle(node, "phy-handle", 0);
|
||||
@ -61,7 +61,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
/* If there is no phy or defective firmware presents
|
||||
* this cortina phy, for which there is no driver
|
||||
* support, ignore it.
|
||||
@@ -1390,7 +1394,6 @@ static int bgx_probe(struct pci_dev *pde
|
||||
@@ -1441,7 +1445,6 @@ static int bgx_probe(struct pci_dev *pde
|
||||
bgx->max_lmac = 1;
|
||||
bgx->bgx_id = MAX_BGX_PER_CN81XX - 1;
|
||||
bgx_vnic[bgx->bgx_id] = bgx;
|
||||
@ -69,7 +69,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
}
|
||||
|
||||
/* On 81xx all are DLMs and on 83xx there are 3 BGX QLMs and one
|
||||
@@ -1407,6 +1410,8 @@ static int bgx_probe(struct pci_dev *pde
|
||||
@@ -1458,6 +1461,8 @@ static int bgx_probe(struct pci_dev *pde
|
||||
if (err)
|
||||
goto err_enable;
|
||||
|
||||
@ -77,10 +77,10 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
+ xcv_init_hw(bgx->phy_mode);
|
||||
bgx_init_hw(bgx);
|
||||
|
||||
/* Enable all LMACs */
|
||||
bgx_register_intr(pdev);
|
||||
--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
|
||||
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
|
||||
@@ -226,7 +226,7 @@ void bgx_lmac_internal_loopback(int node
|
||||
@@ -235,7 +235,7 @@ void bgx_lmac_internal_loopback(int node
|
||||
void bgx_lmac_get_pfc(int node, int bgx_idx, int lmacid, void *pause);
|
||||
void bgx_lmac_set_pfc(int node, int bgx_idx, int lmacid, void *pause);
|
||||
|
||||
|
||||
@ -1,117 +0,0 @@
|
||||
From b1e7791e688620c9bb8476ac2d0bc99abeb7f825 Mon Sep 17 00:00:00 2001
|
||||
From: Tim Harvey <tharvey@gateworks.com>
|
||||
Date: Fri, 29 Dec 2017 16:48:04 -0800
|
||||
Subject: [PATCH] net: thunderx: workaround BGX TX Underflow issue
|
||||
|
||||
While it is not yet understood why a TX underflow can easily occur
|
||||
for SGMII interfaces resulting in a TX wedge. It has been found that
|
||||
disabling/re-enabling the LMAC resolves the issue.
|
||||
|
||||
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
|
||||
---
|
||||
drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 54 +++++++++++++++++++++++
|
||||
drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 9 ++++
|
||||
2 files changed, 63 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
|
||||
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
|
||||
@@ -56,6 +56,7 @@ struct bgx {
|
||||
bool is_dlm;
|
||||
bool is_rgx;
|
||||
int phy_mode;
|
||||
+ char irq_name[7];
|
||||
};
|
||||
|
||||
static struct bgx *bgx_vnic[MAX_BGX_THUNDER];
|
||||
@@ -1344,6 +1345,53 @@ static int bgx_init_phy(struct bgx *bgx)
|
||||
return bgx_init_of_phy(bgx);
|
||||
}
|
||||
|
||||
+static irqreturn_t bgx_intr_handler(int irq, void *data)
|
||||
+{
|
||||
+ struct bgx *bgx = (struct bgx *)data;
|
||||
+ struct device *dev = &bgx->pdev->dev;
|
||||
+ u64 status, val;
|
||||
+ int lmac;
|
||||
+
|
||||
+ for (lmac = 0; lmac < bgx->lmac_count; lmac++) {
|
||||
+ status = bgx_reg_read(bgx, lmac, BGX_GMP_GMI_TXX_INT);
|
||||
+ if (status & GMI_TXX_INT_UNDFLW) {
|
||||
+ dev_err(dev, "BGX%d lmac%d UNDFLW\n", bgx->bgx_id,
|
||||
+ lmac);
|
||||
+ val = bgx_reg_read(bgx, lmac, BGX_CMRX_CFG);
|
||||
+ val &= ~CMR_EN;
|
||||
+ bgx_reg_write(bgx, lmac, BGX_CMRX_CFG, val);
|
||||
+ val |= CMR_EN;
|
||||
+ bgx_reg_write(bgx, lmac, BGX_CMRX_CFG, val);
|
||||
+ }
|
||||
+ /* clear interrupts */
|
||||
+ bgx_reg_write(bgx, lmac, BGX_GMP_GMI_TXX_INT, status);
|
||||
+ }
|
||||
+
|
||||
+ return IRQ_HANDLED;
|
||||
+}
|
||||
+
|
||||
+static int bgx_register_intr(struct pci_dev *pdev)
|
||||
+{
|
||||
+ struct bgx *bgx = pci_get_drvdata(pdev);
|
||||
+ struct device *dev = &pdev->dev;
|
||||
+ int num_vec, ret;
|
||||
+
|
||||
+ /* Enable MSI-X */
|
||||
+ num_vec = pci_msix_vec_count(pdev);
|
||||
+ ret = pci_alloc_irq_vectors(pdev, num_vec, num_vec, PCI_IRQ_MSIX);
|
||||
+ if (ret < 0) {
|
||||
+ dev_err(dev, "Req for #%d msix vectors failed\n", num_vec);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ sprintf(bgx->irq_name, "BGX%d", bgx->bgx_id);
|
||||
+ ret = request_irq(pci_irq_vector(pdev, GMPX_GMI_TX_INT),
|
||||
+ bgx_intr_handler, 0, bgx->irq_name, bgx);
|
||||
+ if (ret)
|
||||
+ return 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int bgx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
int err;
|
||||
@@ -1414,6 +1462,8 @@ static int bgx_probe(struct pci_dev *pde
|
||||
xcv_init_hw(bgx->phy_mode);
|
||||
bgx_init_hw(bgx);
|
||||
|
||||
+ bgx_register_intr(pdev);
|
||||
+
|
||||
/* Enable all LMACs */
|
||||
for (lmac = 0; lmac < bgx->lmac_count; lmac++) {
|
||||
err = bgx_lmac_enable(bgx, lmac);
|
||||
@@ -1424,6 +1474,10 @@ static int bgx_probe(struct pci_dev *pde
|
||||
bgx_lmac_disable(bgx, --lmac);
|
||||
goto err_enable;
|
||||
}
|
||||
+
|
||||
+ /* enable TX FIFO Underflow interrupt */
|
||||
+ bgx_reg_modify(bgx, lmac, BGX_GMP_GMI_TXX_INT_ENA_W1S,
|
||||
+ GMI_TXX_INT_UNDFLW);
|
||||
}
|
||||
|
||||
return 0;
|
||||
--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
|
||||
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
|
||||
@@ -179,6 +179,15 @@
|
||||
#define BGX_GMP_GMI_TXX_BURST 0x38228
|
||||
#define BGX_GMP_GMI_TXX_MIN_PKT 0x38240
|
||||
#define BGX_GMP_GMI_TXX_SGMII_CTL 0x38300
|
||||
+#define BGX_GMP_GMI_TXX_INT 0x38500
|
||||
+#define BGX_GMP_GMI_TXX_INT_W1S 0x38508
|
||||
+#define BGX_GMP_GMI_TXX_INT_ENA_W1C 0x38510
|
||||
+#define BGX_GMP_GMI_TXX_INT_ENA_W1S 0x38518
|
||||
+#define GMI_TXX_INT_PTP_LOST BIT_ULL(4)
|
||||
+#define GMI_TXX_INT_LATE_COL BIT_ULL(3)
|
||||
+#define GMI_TXX_INT_XSDEF BIT_ULL(2)
|
||||
+#define GMI_TXX_INT_XSCOL BIT_ULL(1)
|
||||
+#define GMI_TXX_INT_UNDFLW BIT_ULL(0)
|
||||
|
||||
#define BGX_MSIX_VEC_0_29_ADDR 0x400000 /* +(0..29) << 4 */
|
||||
#define BGX_MSIX_VEC_0_29_CTL 0x400008
|
||||
Loading…
Reference in New Issue
Block a user