Home Home > GIT Browse > SLE15-SP1-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-08-09 14:53:49 +0200
committerTakashi Iwai <tiwai@suse.de>2018-08-09 14:53:49 +0200
commit059d25de4932b161a446cedbed89011329ec04e6 (patch)
treeae58dafbeed37fc40bc867e1a1a2c5a56a9d8896
parent1941ed2980a7bc781f747516e741523e8f81d714 (diff)
Fix arm64 breakage with this_cput_write() (bsc#1089343
CVE-2018-3646).
-rw-r--r--patches.suse/Fix-arm64-breakage-with-this_cpu_write.patch32
-rw-r--r--series.conf2
2 files changed, 34 insertions, 0 deletions
diff --git a/patches.suse/Fix-arm64-breakage-with-this_cpu_write.patch b/patches.suse/Fix-arm64-breakage-with-this_cpu_write.patch
new file mode 100644
index 0000000000..9fe9ce8122
--- /dev/null
+++ b/patches.suse/Fix-arm64-breakage-with-this_cpu_write.patch
@@ -0,0 +1,32 @@
+From: Takashi Iwai <tiwai@suse.de>
+Subject: Fix arm64 breakage with this_cput_write()
+Patch-mainline: Never, a temporary quick fix
+References: bsc#1089343 CVE-2018-3646
+
+The patch patches.arch/17-cpu-hotplug-Boot-HT-siblings-at-least-once.patch
+replaced the original per_cpu_ptr() code with this_cpu_write().
+While it should work on all architecture, arm64 seems misbehaving and
+misses the offset by some reason.
+
+As a quick workaround, make the code back to per_cpu_ptr() reference.
+
+Suggested-by: Mian Yousaf Kaukab <yousaf.kaukab@suse.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ kernel/cpu.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/kernel/cpu.c
++++ b/kernel/cpu.c
+@@ -2056,8 +2056,8 @@ void __init boot_cpu_init(void)
+ */
+ void __init boot_cpu_state_init(void)
+ {
+- this_cpu_write(cpuhp_state.booted_once, true);
+- this_cpu_write(cpuhp_state.state, CPUHP_ONLINE);
++ per_cpu_ptr(&cpuhp_state, smp_processor_id())->booted_once = true;
++ per_cpu_ptr(&cpuhp_state, smp_processor_id())->state = CPUHP_ONLINE;
+ }
+
+ /* kabi */
diff --git a/series.conf b/series.conf
index e00a539623..35c7c13488 100644
--- a/series.conf
+++ b/series.conf
@@ -16531,6 +16531,8 @@
patches.arch/0012-cpu-hotplug-detect-SMT-disabled-by-BIOS.patch
# fixes
patches.arch/0001-x86-KVM-VMX-Initialize-the-vmx_l1d_flush_pages-conte.patch
+ # arm64 fix / workaround
+ patches.suse/Fix-arm64-breakage-with-this_cpu_write.patch
########################################################
# You'd better have a good reason for adding a patch