From: Greg Kroah-Hartman Date: Mon, 26 Jul 2021 10:21:36 +0000 (+0200) Subject: 5.13-stable patches X-Git-Tag: v4.4.277~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38556103bd94891e471a0d4660304f5a21fe3be2;p=thirdparty%2Fkernel%2Fstable-queue.git 5.13-stable patches added patches: arm-multi_v7_defconfig-make-nop_usb_xceiv-driver-built-in.patch arm64-entry-fix-kcov-suppression.patch documentation-fix-intiramfs-script-name.patch net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu-port.patch perf-inject-close-inject.output-on-exit.patch skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch --- diff --git a/queue-5.13/arm-multi_v7_defconfig-make-nop_usb_xceiv-driver-built-in.patch b/queue-5.13/arm-multi_v7_defconfig-make-nop_usb_xceiv-driver-built-in.patch new file mode 100644 index 00000000000..77a0e0cdecd --- /dev/null +++ b/queue-5.13/arm-multi_v7_defconfig-make-nop_usb_xceiv-driver-built-in.patch @@ -0,0 +1,38 @@ +From ab37a7a890c1176144a4c66ff3d51ef2c20ed486 Mon Sep 17 00:00:00 2001 +From: Stefan Wahren +Date: Sat, 10 Jul 2021 13:04:55 +0200 +Subject: ARM: multi_v7_defconfig: Make NOP_USB_XCEIV driver built-in + +From: Stefan Wahren + +commit ab37a7a890c1176144a4c66ff3d51ef2c20ed486 upstream. + +The usage of usb-nop-xceiv PHY on Raspberry Pi boards with BCM283x has +been a "regression source" a lot of times. The last case is breakage of +USB mass storage boot has been commit e590474768f1 ("driver core: Set +fw_devlink=on by default") for multi_v7_defconfig. As long as +NOP_USB_XCEIV is configured as module, the dwc2 USB driver defer probing +endlessly and prevent booting from USB mass storage device. So make +the driver built-in as in bcm2835_defconfig and arm64/defconfig. + +Fixes: e590474768f1 ("driver core: Set fw_devlink=on by default") +Reported-by: Ojaswin Mujoo +Signed-off-by: Stefan Wahren +Link: https://lore.kernel.org/r/1625915095-23077-1-git-send-email-stefan.wahren@i2se.com' +Signed-off-by: Arnd Bergmann +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/configs/multi_v7_defconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/configs/multi_v7_defconfig ++++ b/arch/arm/configs/multi_v7_defconfig +@@ -821,7 +821,7 @@ CONFIG_USB_ISP1760=y + CONFIG_USB_HSIC_USB3503=y + CONFIG_AB8500_USB=y + CONFIG_KEYSTONE_USB_PHY=m +-CONFIG_NOP_USB_XCEIV=m ++CONFIG_NOP_USB_XCEIV=y + CONFIG_AM335X_PHY_USB=m + CONFIG_TWL6030_USB=m + CONFIG_USB_GPIO_VBUS=y diff --git a/queue-5.13/arm64-entry-fix-kcov-suppression.patch b/queue-5.13/arm64-entry-fix-kcov-suppression.patch new file mode 100644 index 00000000000..f9b929c0b01 --- /dev/null +++ b/queue-5.13/arm64-entry-fix-kcov-suppression.patch @@ -0,0 +1,41 @@ +From e6f85cbeb23bd74b8966cf1f15bf7d01399ff625 Mon Sep 17 00:00:00 2001 +From: Mark Rutland +Date: Thu, 15 Jul 2021 13:30:49 +0100 +Subject: arm64: entry: fix KCOV suppression + +From: Mark Rutland + +commit e6f85cbeb23bd74b8966cf1f15bf7d01399ff625 upstream. + +We suppress KCOV for entry.o rather than entry-common.o. As entry.o is +built from entry.S, this is pointless, and permits instrumentation of +entry-common.o, which is built from entry-common.c. + +Fix the Makefile to suppress KCOV for entry-common.o, as we had intended +to begin with. I've verified with objdump that this is working as +expected. + +Fixes: bf6fa2c0dda7 ("arm64: entry: don't instrument entry code with KCOV") +Signed-off-by: Mark Rutland +Cc: Catalin Marinas +Cc: James Morse +Cc: Marc Zyngier +Cc: Will Deacon +Link: https://lore.kernel.org/r/20210715123049.9990-1-mark.rutland@arm.com +Signed-off-by: Will Deacon +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/kernel/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/kernel/Makefile ++++ b/arch/arm64/kernel/Makefile +@@ -17,7 +17,7 @@ CFLAGS_syscall.o += -fno-stack-protector + # It's not safe to invoke KCOV when portions of the kernel environment aren't + # available or are out-of-sync with HW state. Since `noinstr` doesn't always + # inhibit KCOV instrumentation, disable it for the entire compilation unit. +-KCOV_INSTRUMENT_entry.o := n ++KCOV_INSTRUMENT_entry-common.o := n + + # Object file lists. + obj-y := debug-monitors.o entry.o irq.o fpsimd.o \ diff --git a/queue-5.13/documentation-fix-intiramfs-script-name.patch b/queue-5.13/documentation-fix-intiramfs-script-name.patch new file mode 100644 index 00000000000..8b92c194ec2 --- /dev/null +++ b/queue-5.13/documentation-fix-intiramfs-script-name.patch @@ -0,0 +1,61 @@ +From 5e60f363b38fd40e4d8838b5d6f4d4ecee92c777 Mon Sep 17 00:00:00 2001 +From: Robert Richter +Date: Thu, 15 Jul 2021 11:26:02 +0200 +Subject: Documentation: Fix intiramfs script name + +From: Robert Richter + +commit 5e60f363b38fd40e4d8838b5d6f4d4ecee92c777 upstream. + +Documentation was not changed when renaming the script in commit +80e715a06c2d ("initramfs: rename gen_initramfs_list.sh to +gen_initramfs.sh"). Fixing this. + +Basically does: + + $ sed -i -e s/gen_initramfs_list.sh/gen_initramfs.sh/g $(git grep -l gen_initramfs_list.sh) + +Fixes: 80e715a06c2d ("initramfs: rename gen_initramfs_list.sh to gen_initramfs.sh") +Signed-off-by: Robert Richter +Signed-off-by: Masahiro Yamada +Signed-off-by: Greg Kroah-Hartman +--- + Documentation/driver-api/early-userspace/early_userspace_support.rst | 8 ++++---- + Documentation/filesystems/ramfs-rootfs-initramfs.rst | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +--- a/Documentation/driver-api/early-userspace/early_userspace_support.rst ++++ b/Documentation/driver-api/early-userspace/early_userspace_support.rst +@@ -69,17 +69,17 @@ early userspace image can be built by an + + As a technical note, when directories and files are specified, the + entire CONFIG_INITRAMFS_SOURCE is passed to +-usr/gen_initramfs_list.sh. This means that CONFIG_INITRAMFS_SOURCE ++usr/gen_initramfs.sh. This means that CONFIG_INITRAMFS_SOURCE + can really be interpreted as any legal argument to +-gen_initramfs_list.sh. If a directory is specified as an argument then ++gen_initramfs.sh. If a directory is specified as an argument then + the contents are scanned, uid/gid translation is performed, and + usr/gen_init_cpio file directives are output. If a directory is +-specified as an argument to usr/gen_initramfs_list.sh then the ++specified as an argument to usr/gen_initramfs.sh then the + contents of the file are simply copied to the output. All of the output + directives from directory scanning and file contents copying are + processed by usr/gen_init_cpio. + +-See also 'usr/gen_initramfs_list.sh -h'. ++See also 'usr/gen_initramfs.sh -h'. + + Where's this all leading? + ========================= +--- a/Documentation/filesystems/ramfs-rootfs-initramfs.rst ++++ b/Documentation/filesystems/ramfs-rootfs-initramfs.rst +@@ -170,7 +170,7 @@ Documentation/driver-api/early-userspace + The kernel does not depend on external cpio tools. If you specify a + directory instead of a configuration file, the kernel's build infrastructure + creates a configuration file from that directory (usr/Makefile calls +-usr/gen_initramfs_list.sh), and proceeds to package up that directory ++usr/gen_initramfs.sh), and proceeds to package up that directory + using the config file (by feeding it to usr/gen_init_cpio, which is created + from usr/gen_init_cpio.c). The kernel's build-time cpio creation code is + entirely self-contained, and the kernel's boot-time extractor is also diff --git a/queue-5.13/net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu-port.patch b/queue-5.13/net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu-port.patch new file mode 100644 index 00000000000..57959cf2491 --- /dev/null +++ b/queue-5.13/net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu-port.patch @@ -0,0 +1,62 @@ +From b0b33b048dcfbd7da82c3cde4fab02751dfab4d6 Mon Sep 17 00:00:00 2001 +From: Vladimir Oltean +Date: Tue, 13 Jul 2021 12:37:19 +0300 +Subject: net: dsa: sja1105: fix address learning getting disabled on the CPU port + +From: Vladimir Oltean + +commit b0b33b048dcfbd7da82c3cde4fab02751dfab4d6 upstream. + +In May 2019 when commit 640f763f98c2 ("net: dsa: sja1105: Add support +for Spanning Tree Protocol") was introduced, the comment that "STP does +not get called for the CPU port" was true. This changed after commit +0394a63acfe2 ("net: dsa: enable and disable all ports") in August 2019 +and went largely unnoticed, because the sja1105_bridge_stp_state_set() +method did nothing different compared to the static setup done by +sja1105_init_mac_settings(). + +With the ability to turn address learning off introduced by the blamed +commit, there is a new priv->learn_ena port mask in the driver. When +sja1105_bridge_stp_state_set() gets called and we are in +BR_STATE_LEARNING or later, address learning is enabled or not depending +on priv->learn_ena & BIT(port). + +So what happens is that priv->learn_ena is not being set from anywhere +for the CPU port, and the static configuration done by +sja1105_init_mac_settings() is being overwritten. + +To solve this, acknowledge that the static configuration of STP state is +no longer necessary because the STP state is being set by the DSA core +now, but what is necessary is to set priv->learn_ena for the CPU port. + +Fixes: 4d9423549501 ("net: dsa: sja1105: offload bridge port flags to device") +Signed-off-by: Vladimir Oltean +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/dsa/sja1105/sja1105_main.c | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) + +--- a/drivers/net/dsa/sja1105/sja1105_main.c ++++ b/drivers/net/dsa/sja1105/sja1105_main.c +@@ -129,14 +129,12 @@ static int sja1105_init_mac_settings(str + + for (i = 0; i < SJA1105_NUM_PORTS; i++) { + mac[i] = default_mac; +- if (i == dsa_upstream_port(priv->ds, i)) { +- /* STP doesn't get called for CPU port, so we need to +- * set the I/O parameters statically. +- */ +- mac[i].dyn_learn = true; +- mac[i].ingress = true; +- mac[i].egress = true; +- } ++ ++ /* Let sja1105_bridge_stp_state_set() keep address learning ++ * enabled for the CPU port. ++ */ ++ if (dsa_is_cpu_port(ds, i)) ++ priv->learn_ena |= BIT(i); + } + + return 0; diff --git a/queue-5.13/perf-inject-close-inject.output-on-exit.patch b/queue-5.13/perf-inject-close-inject.output-on-exit.patch new file mode 100644 index 00000000000..ea0ca9444c7 --- /dev/null +++ b/queue-5.13/perf-inject-close-inject.output-on-exit.patch @@ -0,0 +1,57 @@ +From 02e6246f5364d5260a6ea6f92ab6f409058b162f Mon Sep 17 00:00:00 2001 +From: Riccardo Mancini +Date: Thu, 15 Jul 2021 18:07:15 +0200 +Subject: perf inject: Close inject.output on exit + +From: Riccardo Mancini + +commit 02e6246f5364d5260a6ea6f92ab6f409058b162f upstream. + +ASan reports a memory leak when running: + + # perf test "83: Zstd perf.data compression/decompression" + +which happens inside 'perf inject'. + +The bug is caused by inject.output never being closed. + +This patch adds the missing perf_data__close(). + +Signed-off-by: Riccardo Mancini +Fixes: 6ef81c55a2b6584c ("perf session: Return error code for perf_session__new() function on failure") +Cc: Ian Rogers +Cc: Jiri Olsa +Cc: Mamatha Inamdar +Cc: Mark Rutland +Cc: Namhyung Kim +Cc: Peter Zijlstra +Link: http://lore.kernel.org/lkml/c06f682afa964687367cf6e92a64ceb49aec76a5.1626343282.git.rickyman7@gmail.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Greg Kroah-Hartman +--- + tools/perf/builtin-inject.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/tools/perf/builtin-inject.c ++++ b/tools/perf/builtin-inject.c +@@ -908,8 +908,10 @@ int cmd_inject(int argc, const char **ar + + data.path = inject.input_name; + inject.session = perf_session__new(&data, inject.output.is_pipe, &inject.tool); +- if (IS_ERR(inject.session)) +- return PTR_ERR(inject.session); ++ if (IS_ERR(inject.session)) { ++ ret = PTR_ERR(inject.session); ++ goto out_close_output; ++ } + + if (zstd_init(&(inject.session->zstd_data), 0) < 0) + pr_warning("Decompression initialization failed.\n"); +@@ -951,5 +953,7 @@ int cmd_inject(int argc, const char **ar + out_delete: + zstd_fini(&(inject.session->zstd_data)); + perf_session__delete(inject.session); ++out_close_output: ++ perf_data__close(&inject.output); + return ret; + } diff --git a/queue-5.13/series b/queue-5.13/series index 8f167f62560..95bcee5ca24 100644 --- a/queue-5.13/series +++ b/queue-5.13/series @@ -213,3 +213,9 @@ drm-amdgpu-update-golden-setting-for-sienna_cichlid.patch spi-spi-cadence-quadspi-revert-fix-division-by-zero-warning.patch bonding-fix-build-issue.patch mptcp-fix-masking-a-bool-warning.patch +skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch +arm-multi_v7_defconfig-make-nop_usb_xceiv-driver-built-in.patch +net-dsa-sja1105-fix-address-learning-getting-disabled-on-the-cpu-port.patch +documentation-fix-intiramfs-script-name.patch +arm64-entry-fix-kcov-suppression.patch +perf-inject-close-inject.output-on-exit.patch diff --git a/queue-5.13/skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch b/queue-5.13/skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch new file mode 100644 index 00000000000..ac11797f011 --- /dev/null +++ b/queue-5.13/skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch @@ -0,0 +1,66 @@ +From 8550ff8d8c75416e984d9c4b082845e57e560984 Mon Sep 17 00:00:00 2001 +From: Paul Blakey +Date: Mon, 5 Jul 2021 13:54:51 +0300 +Subject: skbuff: Release nfct refcount on napi stolen or re-used skbs + +From: Paul Blakey + +commit 8550ff8d8c75416e984d9c4b082845e57e560984 upstream. + +When multiple SKBs are merged to a new skb under napi GRO, +or SKB is re-used by napi, if nfct was set for them in the +driver, it will not be released while freeing their stolen +head state or on re-use. + +Release nfct on napi's stolen or re-used SKBs, and +in gro_list_prepare, check conntrack metadata diff. + +Fixes: 5c6b94604744 ("net/mlx5e: CT: Handle misses after executing CT action") +Reviewed-by: Roi Dayan +Signed-off-by: Paul Blakey +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/core/dev.c | 13 +++++++++++++ + net/core/skbuff.c | 1 + + 2 files changed, 14 insertions(+) + +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -5981,6 +5981,18 @@ static void gro_list_prepare(const struc + diffs = memcmp(skb_mac_header(p), + skb_mac_header(skb), + maclen); ++ ++ diffs |= skb_get_nfct(p) ^ skb_get_nfct(skb); ++ ++ if (!diffs) { ++ struct tc_skb_ext *skb_ext = skb_ext_find(skb, TC_SKB_EXT); ++ struct tc_skb_ext *p_ext = skb_ext_find(p, TC_SKB_EXT); ++ ++ diffs |= (!!p_ext) ^ (!!skb_ext); ++ if (!diffs && unlikely(skb_ext)) ++ diffs |= p_ext->chain ^ skb_ext->chain; ++ } ++ + NAPI_GRO_CB(p)->same_flow = !diffs; + } + } +@@ -6245,6 +6257,7 @@ static void napi_reuse_skb(struct napi_s + skb_shinfo(skb)->gso_type = 0; + skb->truesize = SKB_TRUESIZE(skb_end_offset(skb)); + skb_ext_reset(skb); ++ nf_reset_ct(skb); + + napi->skb = skb; + } +--- a/net/core/skbuff.c ++++ b/net/core/skbuff.c +@@ -939,6 +939,7 @@ void __kfree_skb_defer(struct sk_buff *s + + void napi_skb_free_stolen_head(struct sk_buff *skb) + { ++ nf_reset_ct(skb); + skb_dst_drop(skb); + skb_ext_put(skb); + napi_skb_cache_put(skb);