]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Nov 2020 10:45:19 +0000 (11:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Nov 2020 10:45:19 +0000 (11:45 +0100)
added patches:
acpi-ged-fix-wformat.patch
can-proc-can_remove_proc-silence-remove_proc_entry-warning.patch
kvm-x86-clflushopt-should-be-treated-as-a-no-op-by-emulation.patch
mac80211-always-wind-down-sta-state.patch
perf-x86-intel-uncore-fix-add-bw-copypasta.patch
powerpc-smp-call-rcu_cpu_starting-earlier.patch
selftests-harness-prettify-skip-message-whitespace-again.patch

queue-5.9/acpi-ged-fix-wformat.patch [new file with mode: 0644]
queue-5.9/can-proc-can_remove_proc-silence-remove_proc_entry-warning.patch [new file with mode: 0644]
queue-5.9/kvm-x86-clflushopt-should-be-treated-as-a-no-op-by-emulation.patch [new file with mode: 0644]
queue-5.9/mac80211-always-wind-down-sta-state.patch [new file with mode: 0644]
queue-5.9/perf-x86-intel-uncore-fix-add-bw-copypasta.patch [new file with mode: 0644]
queue-5.9/powerpc-smp-call-rcu_cpu_starting-earlier.patch [new file with mode: 0644]
queue-5.9/selftests-harness-prettify-skip-message-whitespace-again.patch [new file with mode: 0644]
queue-5.9/series

diff --git a/queue-5.9/acpi-ged-fix-wformat.patch b/queue-5.9/acpi-ged-fix-wformat.patch
new file mode 100644 (file)
index 0000000..0b558c3
--- /dev/null
@@ -0,0 +1,40 @@
+From 9debfb81e7654fe7388a49f45bc4d789b94c1103 Mon Sep 17 00:00:00 2001
+From: Nick Desaulniers <ndesaulniers@google.com>
+Date: Sat, 7 Nov 2020 00:49:39 -0800
+Subject: ACPI: GED: fix -Wformat
+
+From: Nick Desaulniers <ndesaulniers@google.com>
+
+commit 9debfb81e7654fe7388a49f45bc4d789b94c1103 upstream.
+
+Clang is more aggressive about -Wformat warnings when the format flag
+specifies a type smaller than the parameter. It turns out that gsi is an
+int. Fixes:
+
+drivers/acpi/evged.c:105:48: warning: format specifies type 'unsigned
+char' but the argument has type 'unsigned int' [-Wformat]
+trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi);
+                                            ^~~
+
+Link: https://github.com/ClangBuiltLinux/linux/issues/378
+Fixes: ea6f3af4c5e6 ("ACPI: GED: add support for _Exx / _Lxx handler methods")
+Acked-by: Ard Biesheuvel <ardb@kernel.org>
+Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/evged.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/acpi/evged.c
++++ b/drivers/acpi/evged.c
+@@ -101,7 +101,7 @@ static acpi_status acpi_ged_request_inte
+       switch (gsi) {
+       case 0 ... 255:
+-              sprintf(ev_name, "_%c%02hhX",
++              sprintf(ev_name, "_%c%02X",
+                       trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi);
+               if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))
diff --git a/queue-5.9/can-proc-can_remove_proc-silence-remove_proc_entry-warning.patch b/queue-5.9/can-proc-can_remove_proc-silence-remove_proc_entry-warning.patch
new file mode 100644 (file)
index 0000000..8dce801
--- /dev/null
@@ -0,0 +1,48 @@
+From 3accbfdc36130282f5ae9e6eecfdf820169fedce Mon Sep 17 00:00:00 2001
+From: Zhang Changzhong <zhangchangzhong@huawei.com>
+Date: Tue, 14 Jul 2020 14:44:50 +0800
+Subject: can: proc: can_remove_proc(): silence remove_proc_entry warning
+
+From: Zhang Changzhong <zhangchangzhong@huawei.com>
+
+commit 3accbfdc36130282f5ae9e6eecfdf820169fedce upstream.
+
+If can_init_proc() fail to create /proc/net/can directory, can_remove_proc()
+will trigger a warning:
+
+WARNING: CPU: 6 PID: 7133 at fs/proc/generic.c:672 remove_proc_entry+0x17b0
+Kernel panic - not syncing: panic_on_warn set ...
+
+Fix to return early from can_remove_proc() if can proc_dir does not exists.
+
+Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
+Link: https://lore.kernel.org/r/1594709090-3203-1-git-send-email-zhangchangzhong@huawei.com
+Fixes: 8e8cda6d737d ("can: initial support for network namespaces")
+Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/can/proc.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/net/can/proc.c
++++ b/net/can/proc.c
+@@ -471,6 +471,9 @@ void can_init_proc(struct net *net)
+  */
+ void can_remove_proc(struct net *net)
+ {
++      if (!net->can.proc_dir)
++              return;
++
+       if (net->can.pde_version)
+               remove_proc_entry(CAN_PROC_VERSION, net->can.proc_dir);
+@@ -498,6 +501,5 @@ void can_remove_proc(struct net *net)
+       if (net->can.pde_rcvlist_sff)
+               remove_proc_entry(CAN_PROC_RCVLIST_SFF, net->can.proc_dir);
+-      if (net->can.proc_dir)
+-              remove_proc_entry("can", net->proc_net);
++      remove_proc_entry("can", net->proc_net);
+ }
diff --git a/queue-5.9/kvm-x86-clflushopt-should-be-treated-as-a-no-op-by-emulation.patch b/queue-5.9/kvm-x86-clflushopt-should-be-treated-as-a-no-op-by-emulation.patch
new file mode 100644 (file)
index 0000000..bb6ee02
--- /dev/null
@@ -0,0 +1,47 @@
+From 51b958e5aeb1e18c00332e0b37c5d4e95a3eff84 Mon Sep 17 00:00:00 2001
+From: David Edmondson <david.edmondson@oracle.com>
+Date: Tue, 3 Nov 2020 12:04:00 +0000
+Subject: KVM: x86: clflushopt should be treated as a no-op by emulation
+
+From: David Edmondson <david.edmondson@oracle.com>
+
+commit 51b958e5aeb1e18c00332e0b37c5d4e95a3eff84 upstream.
+
+The instruction emulator ignores clflush instructions, yet fails to
+support clflushopt. Treat both similarly.
+
+Fixes: 13e457e0eebf ("KVM: x86: Emulator does not decode clflush well")
+Signed-off-by: David Edmondson <david.edmondson@oracle.com>
+Message-Id: <20201103120400.240882-1-david.edmondson@oracle.com>
+Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/emulate.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/kvm/emulate.c
++++ b/arch/x86/kvm/emulate.c
+@@ -4032,6 +4032,12 @@ static int em_clflush(struct x86_emulate
+       return X86EMUL_CONTINUE;
+ }
++static int em_clflushopt(struct x86_emulate_ctxt *ctxt)
++{
++      /* emulating clflushopt regardless of cpuid */
++      return X86EMUL_CONTINUE;
++}
++
+ static int em_movsxd(struct x86_emulate_ctxt *ctxt)
+ {
+       ctxt->dst.val = (s32) ctxt->src.val;
+@@ -4571,7 +4577,7 @@ static const struct opcode group11[] = {
+ };
+ static const struct gprefix pfx_0f_ae_7 = {
+-      I(SrcMem | ByteOp, em_clflush), N, N, N,
++      I(SrcMem | ByteOp, em_clflush), I(SrcMem | ByteOp, em_clflushopt), N, N,
+ };
+ static const struct group_dual group15 = { {
diff --git a/queue-5.9/mac80211-always-wind-down-sta-state.patch b/queue-5.9/mac80211-always-wind-down-sta-state.patch
new file mode 100644 (file)
index 0000000..006f9e2
--- /dev/null
@@ -0,0 +1,60 @@
+From dcd479e10a0510522a5d88b29b8f79ea3467d501 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Fri, 9 Oct 2020 14:17:11 +0200
+Subject: mac80211: always wind down STA state
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit dcd479e10a0510522a5d88b29b8f79ea3467d501 upstream.
+
+When (for example) an IBSS station is pre-moved to AUTHORIZED
+before it's inserted, and then the insertion fails, we don't
+clean up the fast RX/TX states that might already have been
+created, since we don't go through all the state transitions
+again on the way down.
+
+Do that, if it hasn't been done already, when the station is
+freed. I considered only freeing the fast TX/RX state there,
+but we might add more state so it's more robust to wind down
+the state properly.
+
+Note that we warn if the station was ever inserted, it should
+have been properly cleaned up in that case, and the driver
+will probably not like things happening out of order.
+
+Reported-by: syzbot+2e293dbd67de2836ba42@syzkaller.appspotmail.com
+Link: https://lore.kernel.org/r/20201009141710.7223b322a955.I95bd08b9ad0e039c034927cce0b75beea38e059b@changeid
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/mac80211/sta_info.c |   18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+--- a/net/mac80211/sta_info.c
++++ b/net/mac80211/sta_info.c
+@@ -258,6 +258,24 @@ struct sta_info *sta_info_get_by_idx(str
+  */
+ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta)
+ {
++      /*
++       * If we had used sta_info_pre_move_state() then we might not
++       * have gone through the state transitions down again, so do
++       * it here now (and warn if it's inserted).
++       *
++       * This will clear state such as fast TX/RX that may have been
++       * allocated during state transitions.
++       */
++      while (sta->sta_state > IEEE80211_STA_NONE) {
++              int ret;
++
++              WARN_ON_ONCE(test_sta_flag(sta, WLAN_STA_INSERTED));
++
++              ret = sta_info_move_state(sta, sta->sta_state - 1);
++              if (WARN_ONCE(ret, "sta_info_move_state() returned %d\n", ret))
++                      break;
++      }
++
+       if (sta->rate_ctrl)
+               rate_control_free_sta(sta);
diff --git a/queue-5.9/perf-x86-intel-uncore-fix-add-bw-copypasta.patch b/queue-5.9/perf-x86-intel-uncore-fix-add-bw-copypasta.patch
new file mode 100644 (file)
index 0000000..bf1ba48
--- /dev/null
@@ -0,0 +1,39 @@
+From 1a8cfa24e21c2f154791f0cdd85fc28496918722 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd@arndb.de>
+Date: Mon, 26 Oct 2020 22:51:57 +0100
+Subject: perf/x86/intel/uncore: Fix Add BW copypasta
+
+From: Arnd Bergmann <arnd@arndb.de>
+
+commit 1a8cfa24e21c2f154791f0cdd85fc28496918722 upstream.
+
+gcc -Wextra points out a duplicate initialization of one array
+member:
+
+arch/x86/events/intel/uncore_snb.c:478:37: warning: initialized field overwritten [-Woverride-init]
+  478 |  [SNB_PCI_UNCORE_IMC_DATA_READS]  = { SNB_UNCORE_PCI_IMC_DATA_WRITES_BASE,
+
+The only sensible explanation is that a duplicate 'READS' was used
+instead of the correct 'WRITES', so change it back.
+
+Fixes: 24633d901ea4 ("perf/x86/intel/uncore: Add BW counters for GT, IA and IO breakdown")
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/20201026215203.3893972-1-arnd@kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/events/intel/uncore_snb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/events/intel/uncore_snb.c
++++ b/arch/x86/events/intel/uncore_snb.c
+@@ -459,7 +459,7 @@ enum perf_snb_uncore_imc_freerunning_typ
+ static struct freerunning_counters snb_uncore_imc_freerunning[] = {
+       [SNB_PCI_UNCORE_IMC_DATA_READS]         = { SNB_UNCORE_PCI_IMC_DATA_READS_BASE,
+                                                       0x0, 0x0, 1, 32 },
+-      [SNB_PCI_UNCORE_IMC_DATA_READS]         = { SNB_UNCORE_PCI_IMC_DATA_WRITES_BASE,
++      [SNB_PCI_UNCORE_IMC_DATA_WRITES]        = { SNB_UNCORE_PCI_IMC_DATA_WRITES_BASE,
+                                                       0x0, 0x0, 1, 32 },
+       [SNB_PCI_UNCORE_IMC_GT_REQUESTS]        = { SNB_UNCORE_PCI_IMC_GT_REQUESTS_BASE,
+                                                       0x0, 0x0, 1, 32 },
diff --git a/queue-5.9/powerpc-smp-call-rcu_cpu_starting-earlier.patch b/queue-5.9/powerpc-smp-call-rcu_cpu_starting-earlier.patch
new file mode 100644 (file)
index 0000000..e42086b
--- /dev/null
@@ -0,0 +1,73 @@
+From 99f070b62322a4b8c1252952735806d09eb44b68 Mon Sep 17 00:00:00 2001
+From: Qian Cai <cai@redhat.com>
+Date: Wed, 28 Oct 2020 14:23:34 -0400
+Subject: powerpc/smp: Call rcu_cpu_starting() earlier
+
+From: Qian Cai <cai@redhat.com>
+
+commit 99f070b62322a4b8c1252952735806d09eb44b68 upstream.
+
+The call to rcu_cpu_starting() in start_secondary() is not early
+enough in the CPU-hotplug onlining process, which results in lockdep
+splats as follows (with CONFIG_PROVE_RCU_LIST=y):
+
+  WARNING: suspicious RCU usage
+  -----------------------------
+  kernel/locking/lockdep.c:3497 RCU-list traversed in non-reader section!!
+
+  other info that might help us debug this:
+
+  RCU used illegally from offline CPU!
+  rcu_scheduler_active = 1, debug_locks = 1
+  no locks held by swapper/1/0.
+
+  Call Trace:
+  dump_stack+0xec/0x144 (unreliable)
+  lockdep_rcu_suspicious+0x128/0x14c
+  __lock_acquire+0x1060/0x1c60
+  lock_acquire+0x140/0x5f0
+  _raw_spin_lock_irqsave+0x64/0xb0
+  clockevents_register_device+0x74/0x270
+  register_decrementer_clockevent+0x94/0x110
+  start_secondary+0x134/0x800
+  start_secondary_prolog+0x10/0x14
+
+This is avoided by adding a call to rcu_cpu_starting() near the
+beginning of the start_secondary() function. Note that the
+raw_smp_processor_id() is required in order to avoid calling into
+lockdep before RCU has declared the CPU to be watched for readers.
+
+It's safe to call rcu_cpu_starting() in the arch code as well as later
+in generic code, as explained by Paul:
+
+  It uses a per-CPU variable so that RCU pays attention only to the
+  first call to rcu_cpu_starting() if there is more than one of them.
+  This is even intentional, due to there being a generic
+  arch-independent call to rcu_cpu_starting() in
+  notify_cpu_starting().
+
+  So multiple calls to rcu_cpu_starting() are fine by design.
+
+Fixes: 4d004099a668 ("lockdep: Fix lockdep recursion")
+Signed-off-by: Qian Cai <cai@redhat.com>
+Acked-by: Paul E. McKenney <paulmck@kernel.org>
+[mpe: Add Fixes tag, reword slightly & expand change log]
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20201028182334.13466-1-cai@redhat.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/powerpc/kernel/smp.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/powerpc/kernel/smp.c
++++ b/arch/powerpc/kernel/smp.c
+@@ -1251,7 +1251,7 @@ static bool shared_caches;
+ /* Activate a secondary processor. */
+ void start_secondary(void *unused)
+ {
+-      unsigned int cpu = smp_processor_id();
++      unsigned int cpu = raw_smp_processor_id();
+       struct cpumask *(*sibling_mask)(int) = cpu_sibling_mask;
+       mmgrab(&init_mm);
diff --git a/queue-5.9/selftests-harness-prettify-skip-message-whitespace-again.patch b/queue-5.9/selftests-harness-prettify-skip-message-whitespace-again.patch
new file mode 100644 (file)
index 0000000..1fa6ca5
--- /dev/null
@@ -0,0 +1,35 @@
+From ef7086347c82c53a6c5238bd2cf31379f6acadde Mon Sep 17 00:00:00 2001
+From: Tommi Rantala <tommi.t.rantala@nokia.com>
+Date: Thu, 8 Oct 2020 15:26:24 +0300
+Subject: selftests/harness: prettify SKIP message whitespace again
+
+From: Tommi Rantala <tommi.t.rantala@nokia.com>
+
+commit ef7086347c82c53a6c5238bd2cf31379f6acadde upstream.
+
+Commit 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")
+replaced XFAIL with SKIP in the output. Add one more space to make the
+output aligned and pretty again.
+
+Fixes: 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP")
+Signed-off-by: Tommi Rantala <tommi.t.rantala@nokia.com>
+Acked-by: Kees Cook <keescook@chromium.org>
+Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
+Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ tools/testing/selftests/kselftest_harness.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/testing/selftests/kselftest_harness.h
++++ b/tools/testing/selftests/kselftest_harness.h
+@@ -126,7 +126,7 @@
+       snprintf(_metadata->results->reason, \
+                sizeof(_metadata->results->reason), fmt, ##__VA_ARGS__); \
+       if (TH_LOG_ENABLED) { \
+-              fprintf(TH_LOG_STREAM, "#      SKIP     %s\n", \
++              fprintf(TH_LOG_STREAM, "#      SKIP      %s\n", \
+                       _metadata->results->reason); \
+       } \
+       _metadata->passed = 1; \
index f5166cd924962160f9ecb546326049d5783a5670..fe3e9b8e3e666352f44eda2d590f9bbd542443f3 100644 (file)
@@ -5,3 +5,10 @@ powerpc-only-include-kup-radix.h-for-64-bit-book3s.patch
 selftests-powerpc-entry-flush-test.patch
 leds-lm3697-fix-out-of-bound-access.patch
 input-sunkbd-avoid-use-after-free-in-teardown-paths.patch
+mac80211-always-wind-down-sta-state.patch
+can-proc-can_remove_proc-silence-remove_proc_entry-warning.patch
+selftests-harness-prettify-skip-message-whitespace-again.patch
+powerpc-smp-call-rcu_cpu_starting-earlier.patch
+perf-x86-intel-uncore-fix-add-bw-copypasta.patch
+kvm-x86-clflushopt-should-be-treated-as-a-no-op-by-emulation.patch
+acpi-ged-fix-wformat.patch