Home Home > GIT Browse > openSUSE-42.3
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-12-25 21:44:33 +0100
committerTakashi Iwai <tiwai@suse.de>2017-12-25 21:44:33 +0100
commite4b9067e2dbf0e440525f3bae88ecadc42c2ef31 (patch)
treebfe939af0248b8876b6c04128a781633a7a72e65
parentf319846f861cf8533100c74840129daf6797130a (diff)
parent399eb34b7a8a27f8c20e267eefc616f259243670 (diff)
Merge branch 'users/jkosina/SLE12-SP3/pti' into SLE12-SP3-PTIrpm-4.4.103-6.38
-rw-r--r--patches.suse/32-move-pti-feature-check-up.patch77
-rw-r--r--series.conf1
2 files changed, 78 insertions, 0 deletions
diff --git a/patches.suse/32-move-pti-feature-check-up.patch b/patches.suse/32-move-pti-feature-check-up.patch
new file mode 100644
index 0000000000..50fce58493
--- /dev/null
+++ b/patches.suse/32-move-pti-feature-check-up.patch
@@ -0,0 +1,77 @@
+From: Borislav Petkov <bp@suse.de>
+Date: Mon Dec 25 13:57:16 CET 2017
+Subject: x86/kaiser: Move feature detection up
+Patch-mainline: Not yet, under development
+References: bsc#1068032
+
+... before the first use of kaiser_enabled as otherwise funky
+things happen:
+
+ about to get started...
+ (XEN) d0v0 Unhandled page fault fault/trap [#14, ec=0000]
+ (XEN) Pagetable walk from ffff88022a449090:
+ (XEN) L4[0x110] = 0000000229e0e067 0000000000001e0e
+ (XEN) L3[0x008] = 0000000000000000 ffffffffffffffff
+ (XEN) domain_crash_sync called from entry.S: fault at ffff82d08033fd08
+ entry.o#create_bounce_frame+0x135/0x14d
+ (XEN) Domain 0 (vcpu#0) crashed on cpu#0:
+ (XEN) ----[ Xen-4.9.1_02-3.21 x86_64 debug=n Not tainted ]----
+ (XEN) CPU: 0
+ (XEN) RIP: e033:[<ffffffff81007460>]
+ (XEN) RFLAGS: 0000000000000286 EM: 1 CONTEXT: pv guest (d0v0)
+
+Signed-off-by: Borislav Petkov <bp@suse.de>
+
+---
+ arch/x86/include/asm/kaiser.h | 2 ++
+ arch/x86/kernel/setup.c | 7 +++++++
+ arch/x86/mm/kaiser.c | 2 --
+ 3 files changed, 9 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/include/asm/kaiser.h
++++ b/arch/x86/include/asm/kaiser.h
+@@ -96,8 +96,10 @@ DECLARE_PER_CPU(unsigned long, x86_cr3_p
+ extern char __per_cpu_user_mapped_start[], __per_cpu_user_mapped_end[];
+
+ extern int kaiser_enabled;
++extern void __init kaiser_check_boottime_disable(void);
+ #else
+ #define kaiser_enabled 0
++static inline void __init kaiser_check_boottime_disable(void) {}
+ #endif /* CONFIG_KAISER */
+
+ /*
+--- a/arch/x86/kernel/setup.c
++++ b/arch/x86/kernel/setup.c
+@@ -116,6 +116,7 @@
+ #include <asm/mmu_context.h>
+
+ #include <asm/suspend.h>
++#include <asm/kaiser.h>
+
+ /*
+ * max_low_pfn_mapped: highest direct mapped pfn under 4GB
+@@ -1037,6 +1038,12 @@ void __init setup_arch(char **cmdline_p)
+ */
+ init_hypervisor_platform();
+
++ /*
++ * This needs to happen right after XENPV is set on xen and
++ * kaiser_enabled is checked below in cleanup_highmap().
++ */
++ kaiser_check_boottime_disable();
++
+ x86_init.resources.probe_roms();
+
+ /* after parse_early_param, so could debug it */
+--- a/arch/x86/mm/kaiser.c
++++ b/arch/x86/mm/kaiser.c
+@@ -305,8 +305,6 @@ void __init kaiser_init(void)
+ {
+ int cpu;
+
+- kaiser_check_boottime_disable();
+-
+ if (!kaiser_enabled)
+ return;
+
diff --git a/series.conf b/series.conf
index 3187338afc..2738d201ab 100644
--- a/series.conf
+++ b/series.conf
@@ -19855,6 +19855,7 @@
patches.suse/29-x86-svm-add-code-to-clear-registers-on-vm-exit.patch
patches.suse/30-x86-cpu-amd-make-the-lfence-instruction-serialized.patch
patches.suse/31-x86-cpu-amd-remove-now-unused-definition-of-mfence_rdtsc-feature.patch
+ patches.suse/32-move-pti-feature-check-up.patch
########################################################
# You'd better have a good reason for adding a patch