From: Greg Kroah-Hartman Date: Sat, 18 Feb 2023 11:19:29 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v4.14.306~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e670407ce7972def6715e19b1992cfbf3f48ad4b;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: i40e-add-double-of-vlan-header-when-computing-the-max-mtu.patch net-bgmac-fix-bcm5358-support-by-setting-correct-flags.patch revert-squashfs-harden-sanity-check-in-squashfs_read_xattr_id_table.patch --- diff --git a/queue-4.14/i40e-add-double-of-vlan-header-when-computing-the-max-mtu.patch b/queue-4.14/i40e-add-double-of-vlan-header-when-computing-the-max-mtu.patch new file mode 100644 index 00000000000..7e4046f873f --- /dev/null +++ b/queue-4.14/i40e-add-double-of-vlan-header-when-computing-the-max-mtu.patch @@ -0,0 +1,33 @@ +From ce45ffb815e8e238f05de1630be3969b6bb15e4e Mon Sep 17 00:00:00 2001 +From: Jason Xing +Date: Wed, 8 Feb 2023 10:43:33 +0800 +Subject: i40e: add double of VLAN header when computing the max MTU + +From: Jason Xing + +commit ce45ffb815e8e238f05de1630be3969b6bb15e4e upstream. + +Include the second VLAN HLEN into account when computing the maximum +MTU size as other drivers do. + +Fixes: 0c8493d90b6b ("i40e: add XDP support for pass and drop actions") +Signed-off-by: Jason Xing +Reviewed-by: Alexander Duyck +Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) +Signed-off-by: Tony Nguyen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/intel/i40e/i40e_main.c ++++ b/drivers/net/ethernet/intel/i40e/i40e_main.c +@@ -2480,7 +2480,7 @@ static int i40e_change_mtu(struct net_de + struct i40e_pf *pf = vsi->back; + + if (i40e_enabled_xdp_vsi(vsi)) { +- int frame_size = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; ++ int frame_size = new_mtu + I40E_PACKET_HDR_PAD; + + if (frame_size > i40e_max_xdp_frame_size(vsi)) + return -EINVAL; diff --git a/queue-4.14/net-bgmac-fix-bcm5358-support-by-setting-correct-flags.patch b/queue-4.14/net-bgmac-fix-bcm5358-support-by-setting-correct-flags.patch new file mode 100644 index 00000000000..167c2565e6e --- /dev/null +++ b/queue-4.14/net-bgmac-fix-bcm5358-support-by-setting-correct-flags.patch @@ -0,0 +1,51 @@ +From d61615c366a489646a1bfe5b33455f916762d5f4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Wed, 8 Feb 2023 10:16:37 +0100 +Subject: net: bgmac: fix BCM5358 support by setting correct flags +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Rafał Miłecki + +commit d61615c366a489646a1bfe5b33455f916762d5f4 upstream. + +Code blocks handling BCMA_CHIP_ID_BCM5357 and BCMA_CHIP_ID_BCM53572 were +incorrectly unified. Chip package values are not unique and cannot be +checked independently. They are meaningful only in a context of a given +chip. + +Packages BCM5358 and BCM47188 share the same value but then belong to +different chips. Code unification resulted in treating BCM5358 as +BCM47188 and broke its initialization. + +Link: https://github.com/openwrt/openwrt/issues/8278 +Fixes: cb1b0f90acfe ("net: ethernet: bgmac: unify code of the same family") +Cc: Jon Mason +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Link: https://lore.kernel.org/r/20230208091637.16291-1-zajec5@gmail.com +Signed-off-by: Jakub Kicinski +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/ethernet/broadcom/bgmac-bcma.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bgmac-bcma.c ++++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c +@@ -222,12 +222,12 @@ static int bgmac_probe(struct bcma_devic + bgmac->feature_flags |= BGMAC_FEAT_CLKCTLST; + bgmac->feature_flags |= BGMAC_FEAT_FLW_CTRL1; + bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_PHY; +- if (ci->pkg == BCMA_PKG_ID_BCM47188 || +- ci->pkg == BCMA_PKG_ID_BCM47186) { ++ if ((ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg == BCMA_PKG_ID_BCM47186) || ++ (ci->id == BCMA_CHIP_ID_BCM53572 && ci->pkg == BCMA_PKG_ID_BCM47188)) { + bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_RGMII; + bgmac->feature_flags |= BGMAC_FEAT_IOST_ATTACHED; + } +- if (ci->pkg == BCMA_PKG_ID_BCM5358) ++ if (ci->id == BCMA_CHIP_ID_BCM5357 && ci->pkg == BCMA_PKG_ID_BCM5358) + bgmac->feature_flags |= BGMAC_FEAT_SW_TYPE_EPHYRMII; + break; + case BCMA_CHIP_ID_BCM53573: diff --git a/queue-4.14/revert-squashfs-harden-sanity-check-in-squashfs_read_xattr_id_table.patch b/queue-4.14/revert-squashfs-harden-sanity-check-in-squashfs_read_xattr_id_table.patch new file mode 100644 index 00000000000..9664ad5ee0e --- /dev/null +++ b/queue-4.14/revert-squashfs-harden-sanity-check-in-squashfs_read_xattr_id_table.patch @@ -0,0 +1,34 @@ +From a5b21d8d791cd4db609d0bbcaa9e0c7e019888d1 Mon Sep 17 00:00:00 2001 +From: Andrew Morton +Date: Thu, 2 Feb 2023 18:07:35 -0800 +Subject: revert "squashfs: harden sanity check in squashfs_read_xattr_id_table" + +From: Andrew Morton + +commit a5b21d8d791cd4db609d0bbcaa9e0c7e019888d1 upstream. + +This fix was nacked by Philip, for reasons identified in the email linked +below. + +Link: https://lkml.kernel.org/r/68f15d67-8945-2728-1f17-5b53a80ec52d@squashfs.org.uk +Fixes: 72e544b1b28325 ("squashfs: harden sanity check in squashfs_read_xattr_id_table") +Cc: Alexey Khoroshilov +Cc: Fedor Pchelkin +Cc: Phillip Lougher +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + fs/squashfs/xattr_id.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/squashfs/xattr_id.c ++++ b/fs/squashfs/xattr_id.c +@@ -89,7 +89,7 @@ __le64 *squashfs_read_xattr_id_table(str + /* Sanity check values */ + + /* there is always at least one xattr id */ +- if (*xattr_ids <= 0) ++ if (*xattr_ids == 0) + return ERR_PTR(-EINVAL); + + len = SQUASHFS_XATTR_BLOCK_BYTES(*xattr_ids); diff --git a/queue-4.14/series b/queue-4.14/series index 8eb71fd49e2..1866f8b9092 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -39,3 +39,6 @@ revert-x86-fpu-use-_alignof-to-avoid-undefined-behavior-in-type_align.patch mmc-sdio-fix-possible-resource-leaks-in-some-error-paths.patch alsa-hda-conexant-add-a-new-hda-codec-sn6180.patch hugetlb-check-for-undefined-shift-on-32-bit-architectures.patch +revert-squashfs-harden-sanity-check-in-squashfs_read_xattr_id_table.patch +i40e-add-double-of-vlan-header-when-computing-the-max-mtu.patch +net-bgmac-fix-bcm5358-support-by-setting-correct-flags.patch