]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2022 13:16:01 +0000 (15:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2022 13:16:01 +0000 (15:16 +0200)
added patches:
crypto-lib-blake2s-reduce-stack-frame-usage-in-self-test.patch
revert-mwifiex-fix-sleep-in-atomic-context-bugs-caused-by-dev_coredumpv.patch
revert-s390-smp-enforce-lowcore-protection-on-cpu-restart.patch
tcp-fix-over-estimation-in-sk_forced_mem_schedule.patch

queue-5.15/crypto-lib-blake2s-reduce-stack-frame-usage-in-self-test.patch [new file with mode: 0644]
queue-5.15/revert-mwifiex-fix-sleep-in-atomic-context-bugs-caused-by-dev_coredumpv.patch [new file with mode: 0644]
queue-5.15/revert-s390-smp-enforce-lowcore-protection-on-cpu-restart.patch [new file with mode: 0644]
queue-5.15/series
queue-5.15/tcp-fix-over-estimation-in-sk_forced_mem_schedule.patch [new file with mode: 0644]

diff --git a/queue-5.15/crypto-lib-blake2s-reduce-stack-frame-usage-in-self-test.patch b/queue-5.15/crypto-lib-blake2s-reduce-stack-frame-usage-in-self-test.patch
new file mode 100644 (file)
index 0000000..098d5da
--- /dev/null
@@ -0,0 +1,53 @@
+From d6c14da474bf260d73953fbf7992c98d9112aec7 Mon Sep 17 00:00:00 2001
+From: "Jason A. Donenfeld" <Jason@zx2c4.com>
+Date: Mon, 20 Jun 2022 09:52:43 +0200
+Subject: crypto: lib/blake2s - reduce stack frame usage in self test
+
+From: Jason A. Donenfeld <Jason@zx2c4.com>
+
+commit d6c14da474bf260d73953fbf7992c98d9112aec7 upstream.
+
+Using 3 blocks here doesn't give us much more than using 2, and it
+causes a stack frame size warning on certain compiler/config/arch
+combinations:
+
+   lib/crypto/blake2s-selftest.c: In function 'blake2s_selftest':
+>> lib/crypto/blake2s-selftest.c:632:1: warning: the frame size of 1088 bytes is larger than 1024 bytes [-Wframe-larger-than=]
+     632 | }
+         | ^
+
+So this patch just reduces the block from 3 to 2, which makes the
+warning go away.
+
+Reported-by: kernel test robot <lkp@intel.com>
+Link: https://lore.kernel.org/linux-crypto/202206200851.gE3MHCgd-lkp@intel.com
+Fixes: 2d16803c562e ("crypto: blake2s - remove shash module")
+Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ lib/crypto/blake2s-selftest.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/lib/crypto/blake2s-selftest.c
++++ b/lib/crypto/blake2s-selftest.c
+@@ -593,7 +593,7 @@ bool __init blake2s_selftest(void)
+               enum { TEST_ALIGNMENT = 16 };
+               u8 unaligned_block[BLAKE2S_BLOCK_SIZE + TEST_ALIGNMENT - 1]
+                                       __aligned(TEST_ALIGNMENT);
+-              u8 blocks[BLAKE2S_BLOCK_SIZE * 3];
++              u8 blocks[BLAKE2S_BLOCK_SIZE * 2];
+               struct blake2s_state state1, state2;
+               get_random_bytes(blocks, sizeof(blocks));
+@@ -603,8 +603,8 @@ bool __init blake2s_selftest(void)
+     defined(CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S)
+               memcpy(&state1, &state, sizeof(state1));
+               memcpy(&state2, &state, sizeof(state2));
+-              blake2s_compress(&state1, blocks, 3, BLAKE2S_BLOCK_SIZE);
+-              blake2s_compress_generic(&state2, blocks, 3, BLAKE2S_BLOCK_SIZE);
++              blake2s_compress(&state1, blocks, 2, BLAKE2S_BLOCK_SIZE);
++              blake2s_compress_generic(&state2, blocks, 2, BLAKE2S_BLOCK_SIZE);
+               if (memcmp(&state1, &state2, sizeof(state1))) {
+                       pr_err("blake2s random compress self-test %d: FAIL\n",
+                              i + 1);
diff --git a/queue-5.15/revert-mwifiex-fix-sleep-in-atomic-context-bugs-caused-by-dev_coredumpv.patch b/queue-5.15/revert-mwifiex-fix-sleep-in-atomic-context-bugs-caused-by-dev_coredumpv.patch
new file mode 100644 (file)
index 0000000..d0f97ef
--- /dev/null
@@ -0,0 +1,100 @@
+From 5f8954e099b8ae96e7de1bb95950e00c85bedd40 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Mon, 27 Jun 2022 16:35:59 +0200
+Subject: Revert "mwifiex: fix sleep in atomic context bugs caused by dev_coredumpv"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+commit 5f8954e099b8ae96e7de1bb95950e00c85bedd40 upstream.
+
+This reverts commit a52ed4866d2b90dd5e4ae9dabd453f3ed8fa3cbc as it
+causes build problems in linux-next.  It needs to be reintroduced in a
+way that can allow the api to evolve and not require a "flag day" to
+catch all users.
+
+Link: https://lore.kernel.org/r/20220623160723.7a44b573@canb.auug.org.au
+Cc: Duoming Zhou <duoming@zju.edu.cn>
+Cc: Brian Norris <briannorris@chromium.org>
+Cc: Johannes Berg <johannes@sipsolutions.net>
+Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/wireless/marvell/mwifiex/init.c      |    9 ++++-----
+ drivers/net/wireless/marvell/mwifiex/main.h      |    3 +--
+ drivers/net/wireless/marvell/mwifiex/sta_event.c |    6 +++---
+ 3 files changed, 8 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/wireless/marvell/mwifiex/init.c
++++ b/drivers/net/wireless/marvell/mwifiex/init.c
+@@ -63,10 +63,9 @@ static void wakeup_timer_fn(struct timer
+               adapter->if_ops.card_reset(adapter);
+ }
+-static void fw_dump_work(struct work_struct *work)
++static void fw_dump_timer_fn(struct timer_list *t)
+ {
+-      struct mwifiex_adapter *adapter =
+-              container_of(work, struct mwifiex_adapter, devdump_work.work);
++      struct mwifiex_adapter *adapter = from_timer(adapter, t, devdump_timer);
+       mwifiex_upload_device_dump(adapter);
+ }
+@@ -322,7 +321,7 @@ static void mwifiex_init_adapter(struct
+       adapter->active_scan_triggered = false;
+       timer_setup(&adapter->wakeup_timer, wakeup_timer_fn, 0);
+       adapter->devdump_len = 0;
+-      INIT_DELAYED_WORK(&adapter->devdump_work, fw_dump_work);
++      timer_setup(&adapter->devdump_timer, fw_dump_timer_fn, 0);
+ }
+ /*
+@@ -401,7 +400,7 @@ static void
+ mwifiex_adapter_cleanup(struct mwifiex_adapter *adapter)
+ {
+       del_timer(&adapter->wakeup_timer);
+-      cancel_delayed_work_sync(&adapter->devdump_work);
++      del_timer_sync(&adapter->devdump_timer);
+       mwifiex_cancel_all_pending_cmd(adapter);
+       wake_up_interruptible(&adapter->cmd_wait_q.wait);
+       wake_up_interruptible(&adapter->hs_activate_wait_q);
+--- a/drivers/net/wireless/marvell/mwifiex/main.h
++++ b/drivers/net/wireless/marvell/mwifiex/main.h
+@@ -49,7 +49,6 @@
+ #include <linux/pm_runtime.h>
+ #include <linux/slab.h>
+ #include <linux/of_irq.h>
+-#include <linux/workqueue.h>
+ #include "decl.h"
+ #include "ioctl.h"
+@@ -1054,7 +1053,7 @@ struct mwifiex_adapter {
+       /* Device dump data/length */
+       void *devdump_data;
+       int devdump_len;
+-      struct delayed_work devdump_work;
++      struct timer_list devdump_timer;
+       bool ignore_btcoex_events;
+ };
+--- a/drivers/net/wireless/marvell/mwifiex/sta_event.c
++++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c
+@@ -623,8 +623,8 @@ mwifiex_fw_dump_info_event(struct mwifie
+                * transmission event get lost, in this cornel case,
+                * user would still get partial of the dump.
+                */
+-              schedule_delayed_work(&adapter->devdump_work,
+-                                    msecs_to_jiffies(MWIFIEX_TIMER_10S));
++              mod_timer(&adapter->devdump_timer,
++                        jiffies + msecs_to_jiffies(MWIFIEX_TIMER_10S));
+       }
+       /* Overflow check */
+@@ -643,7 +643,7 @@ mwifiex_fw_dump_info_event(struct mwifie
+       return;
+ upload_dump:
+-      cancel_delayed_work_sync(&adapter->devdump_work);
++      del_timer_sync(&adapter->devdump_timer);
+       mwifiex_upload_device_dump(adapter);
+ }
diff --git a/queue-5.15/revert-s390-smp-enforce-lowcore-protection-on-cpu-restart.patch b/queue-5.15/revert-s390-smp-enforce-lowcore-protection-on-cpu-restart.patch
new file mode 100644 (file)
index 0000000..935fb70
--- /dev/null
@@ -0,0 +1,31 @@
+From 953503751a426413ea8aee2299ae3ee971b70d9b Mon Sep 17 00:00:00 2001
+From: Alexander Gordeev <agordeev@linux.ibm.com>
+Date: Sat, 6 Aug 2022 09:29:46 +0200
+Subject: Revert "s390/smp: enforce lowcore protection on CPU restart"
+
+From: Alexander Gordeev <agordeev@linux.ibm.com>
+
+commit 953503751a426413ea8aee2299ae3ee971b70d9b upstream.
+
+This reverts commit 6f5c672d17f583b081e283927f5040f726c54598.
+
+This breaks normal crash dump when CPU0 is offline.
+
+Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/s390/kernel/setup.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/s390/kernel/setup.c
++++ b/arch/s390/kernel/setup.c
+@@ -507,8 +507,8 @@ static void __init setup_lowcore_dat_on(
+       S390_lowcore.svc_new_psw.mask |= PSW_MASK_DAT;
+       S390_lowcore.program_new_psw.mask |= PSW_MASK_DAT;
+       S390_lowcore.io_new_psw.mask |= PSW_MASK_DAT;
+-      __ctl_set_bit(0, 28);
+       __ctl_store(S390_lowcore.cregs_save_area, 0, 15);
++      __ctl_set_bit(0, 28);
+       put_abs_lowcore(restart_flags, RESTART_FLAG_CTLREGS);
+       put_abs_lowcore(program_new_psw, lc->program_new_psw);
+       for (cr = 0; cr < ARRAY_SIZE(lc->cregs_save_area); cr++)
index 704159e20a9043eb7c2be32fa61bb554c0cfa47d..bb3fc1205de93bc0792830de9b1d4b715c15232d 100644 (file)
@@ -762,3 +762,7 @@ tracing-use-a-struct-alignof-to-determine-trace-event-field-alignment.patch
 net_sched-cls_route-remove-from-list-when-handle-is-0.patch
 arm64-kexec_file-use-more-system-keyrings-to-verify-kernel-image-signature.patch
 mac80211-fix-a-memory-leak-where-sta_info-is-not-freed.patch
+tcp-fix-over-estimation-in-sk_forced_mem_schedule.patch
+crypto-lib-blake2s-reduce-stack-frame-usage-in-self-test.patch
+revert-mwifiex-fix-sleep-in-atomic-context-bugs-caused-by-dev_coredumpv.patch
+revert-s390-smp-enforce-lowcore-protection-on-cpu-restart.patch
diff --git a/queue-5.15/tcp-fix-over-estimation-in-sk_forced_mem_schedule.patch b/queue-5.15/tcp-fix-over-estimation-in-sk_forced_mem_schedule.patch
new file mode 100644 (file)
index 0000000..e12b03b
--- /dev/null
@@ -0,0 +1,45 @@
+From c4ee118561a0f74442439b7b5b486db1ac1ddfeb Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <edumazet@google.com>
+Date: Tue, 14 Jun 2022 10:17:33 -0700
+Subject: tcp: fix over estimation in sk_forced_mem_schedule()
+
+From: Eric Dumazet <edumazet@google.com>
+
+commit c4ee118561a0f74442439b7b5b486db1ac1ddfeb upstream.
+
+sk_forced_mem_schedule() has a bug similar to ones fixed
+in commit 7c80b038d23e ("net: fix sk_wmem_schedule() and
+sk_rmem_schedule() errors")
+
+While this bug has little chance to trigger in old kernels,
+we need to fix it before the following patch.
+
+Fixes: d83769a580f1 ("tcp: fix possible deadlock in tcp_send_fin()")
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
+Reviewed-by: Shakeel Butt <shakeelb@google.com>
+Reviewed-by: Wei Wang <weiwan@google.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv4/tcp_output.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/net/ipv4/tcp_output.c
++++ b/net/ipv4/tcp_output.c
+@@ -3372,11 +3372,12 @@ void tcp_xmit_retransmit_queue(struct so
+  */
+ void sk_forced_mem_schedule(struct sock *sk, int size)
+ {
+-      int amt;
++      int delta, amt;
+-      if (size <= sk->sk_forward_alloc)
++      delta = size - sk->sk_forward_alloc;
++      if (delta <= 0)
+               return;
+-      amt = sk_mem_pages(size);
++      amt = sk_mem_pages(delta);
+       sk->sk_forward_alloc += amt * SK_MEM_QUANTUM;
+       sk_memory_allocated_add(sk, amt);