Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-08-09 08:03:33 +0200
committerTakashi Iwai <tiwai@suse.de>2019-08-09 08:03:33 +0200
commitfbff281d9c4efb89f326f9fdff9ffde1948c312e (patch)
tree7e87ff5ca386c0a0c0e17168b51587a946dc29c4
parent5724a7b1fd01689caaacb5821db5414be5a7bfe8 (diff)
parent66b10289fa9363a82bee86b33aab869e1be5c0bf (diff)
Merge branch 'users/bpetkov/SLE15/for-next' into SLE15
Pull x86 fixes from Borislav Petkov
-rw-r--r--blacklist.conf3
-rw-r--r--patches.arch/x86-microcode-fix-the-microcode-load-on-cpu-hotplug-for-real.patch65
-rw-r--r--patches.kabi/kabi-x86-microcode-hotplug-state-fix.patch8
-rw-r--r--series.conf1
4 files changed, 73 insertions, 4 deletions
diff --git a/blacklist.conf b/blacklist.conf
index 24983ddc14..e027a8ec27 100644
--- a/blacklist.conf
+++ b/blacklist.conf
@@ -1302,3 +1302,6 @@ cbc0fa7b6e8c6180c18fd951d28197281a526330 # ASoC: da7219: superfluous, kconfig
f9927000cb35f250051f0f1878db12ee2626eea1 # ASoC: sun4i: not applicable
83ee240aad9147ed5dac5a7c7b4c559d134072e7 # ASoC: cx2072x: superfluous
fd14f4436fd47d5418023c90e933e66d3645552e # ASoC: davinci: not applicable
+6ae865615fc43d014da2fd1f1bba7e81ee622d1b # UBSAN bug which we don't use
+81c7ed296dcd02bc0b4488246d040e03e633737a # We don't support CONFIG_X86_5LEVEL
+c1887159eb48ba40e775584cfb2a443962cf1a05 # Clang fix
diff --git a/patches.arch/x86-microcode-fix-the-microcode-load-on-cpu-hotplug-for-real.patch b/patches.arch/x86-microcode-fix-the-microcode-load-on-cpu-hotplug-for-real.patch
new file mode 100644
index 0000000000..36d7d31b73
--- /dev/null
+++ b/patches.arch/x86-microcode-fix-the-microcode-load-on-cpu-hotplug-for-real.patch
@@ -0,0 +1,65 @@
+From: Thomas Gleixner <tglx@linutronix.de>
+Date: Tue, 18 Jun 2019 22:31:40 +0200
+Subject: x86/microcode: Fix the microcode load on CPU hotplug for real
+Git-commit: 5423f5ce5ca410b3646f355279e4e937d452e622
+Patch-mainline: v5.2-rc7
+References: bsc#1114279
+
+A recent change moved the microcode loader hotplug callback into the early
+startup phase which is running with interrupts disabled. It missed that
+the callbacks invoke sysfs functions which might sleep causing nice 'might
+sleep' splats with proper debugging enabled.
+
+Split the callbacks and only load the microcode in the early startup phase
+and move the sysfs handling back into the later threaded and preemptible
+bringup phase where it was before.
+
+Fixes: 78f4e932f776 ("x86/microcode, cpuhotplug: Add a microcode loader CPU hotplug callback")
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: stable@vger.kernel.org
+Cc: x86-ml <x86@kernel.org>
+Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1906182228350.1766@nanos.tec.linutronix.de
+---
+ arch/x86/kernel/cpu/microcode/core.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
+index a813987b5552..cb0fdcaf1415 100644
+--- a/arch/x86/kernel/cpu/microcode/core.c
++++ b/arch/x86/kernel/cpu/microcode/core.c
+@@ -789,13 +789,16 @@ static struct syscore_ops mc_syscore_ops = {
+ .resume = mc_bp_resume,
+ };
+
+-static int mc_cpu_online(unsigned int cpu)
++static int mc_cpu_starting(unsigned int cpu)
+ {
+- struct device *dev;
+-
+- dev = get_cpu_device(cpu);
+ microcode_update_cpu(cpu);
+ pr_debug("CPU%d added\n", cpu);
++ return 0;
++}
++
++static int mc_cpu_online(unsigned int cpu)
++{
++ struct device *dev = get_cpu_device(cpu);
+
+ if (sysfs_create_group(&dev->kobj, &mc_attr_group))
+ pr_err("Failed to create group for CPU%d\n", cpu);
+@@ -872,7 +875,9 @@ int __init microcode_init(void)
+ goto out_ucode_group;
+
+ register_syscore_ops(&mc_syscore_ops);
+- cpuhp_setup_state_nocalls(CPUHP_AP_MICROCODE_LOADER, "x86/microcode:online",
++ cpuhp_setup_state_nocalls(CPUHP_AP_MICROCODE_LOADER, "x86/microcode:starting",
++ mc_cpu_starting, NULL);
++ cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "x86/microcode:online",
+ mc_cpu_online, mc_cpu_down_prep);
+
+ pr_info("Microcode Update Driver: v%s.", DRIVER_VERSION);
+
diff --git a/patches.kabi/kabi-x86-microcode-hotplug-state-fix.patch b/patches.kabi/kabi-x86-microcode-hotplug-state-fix.patch
index e180f9a6e5..894263fe9d 100644
--- a/patches.kabi/kabi-x86-microcode-hotplug-state-fix.patch
+++ b/patches.kabi/kabi-x86-microcode-hotplug-state-fix.patch
@@ -16,16 +16,16 @@ Signed-off-by: Borislav Petkov <bp@suse.de>
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
-@@ -853,6 +853,9 @@ int __init microcode_init(void)
+@@ -856,6 +856,9 @@ int __init microcode_init(void)
goto out_ucode_group;
register_syscore_ops(&mc_syscore_ops);
+
+#define CPUHP_AP_MICROCODE_LOADER CPUHP_AP_ARM_MVEBU_COHERENCY
+
- cpuhp_setup_state_nocalls(CPUHP_AP_MICROCODE_LOADER, "x86/microcode:online",
- mc_cpu_online, mc_cpu_down_prep);
-
+ cpuhp_setup_state_nocalls(CPUHP_AP_MICROCODE_LOADER, "x86/microcode:starting",
+ mc_cpu_starting, NULL);
+ cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "x86/microcode:online",
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -83,8 +83,7 @@ enum cpuhp_state {
diff --git a/series.conf b/series.conf
index 565e34a2ca..59bd41f07e 100644
--- a/series.conf
+++ b/series.conf
@@ -22940,6 +22940,7 @@
patches.suse/af_packet-Block-execution-of-tasks-waiting-for-trans.patch
patches.fixes/scsi-vmw_pscsi-Fix-use-after-free-in-pvscsi_queue_lc.patch
patches.fixes/efi-bgrt-Drop-BGRT-status-field-reserved-bits-check.patch
+ patches.arch/x86-microcode-fix-the-microcode-load-on-cpu-hotplug-for-real.patch
patches.fixes/Bluetooth-Fix-faulty-expression-for-minimum-encrypti.patch
patches.suse/ftrace-x86-remove-possible-deadlock-between-register_kprobe-and-ftrace_run_update_code.patch
patches.suse/tracing-snapshot-resize-spare-buffer-if-size-changed.patch