Patch "x86/kaiser: Move feature detection up" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
x86/kaiser: Move feature detection up
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-kaiser-move-feature-detection-up.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Jan 3 20:37:21 CET 2018
From: Borislav Petkov <[email protected]>
Date: Mon, 25 Dec 2017 13:57:16 +0100
Subject: x86/kaiser: Move feature detection up
From: Borislav Petkov <[email protected]>
... 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)
--- 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(-)
arch/x86/include/asm/kaiser.h +2 -0
@@ -96,8 +96,10 @@ DECLARE_PER_CPU(unsigned long, x86_cr3_pextern 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 */ /*
arch/x86/kernel/setup.c +7 -0
@@ -114,6 +114,7 @@#include <asm/microcode.h> #include <asm/mmu_context.h> #include <asm/kaslr.h> +#include <asm/kaiser.h> /* * max_low_pfn_mapped: highest direct mapped pfn under 4GB
@@ -1019,6 +1020,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 */
arch/x86/mm/kaiser.c +0 -2
@@ -310,8 +310,6 @@ void __init kaiser_init(void) {int cpu; -kaiser_check_boottime_disable (); -if (!kaiser_enabled)return ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/x86-paravirt-dont-patch-flush_tlb_single.patch queue-4.9/x86-kaiser-reenable-paravirt.patch queue-4.9/x86-kaiser-rename-and-simplify-x86_feature_kaiser-handling.patch queue-4.9/x86-kaiser-check-boottime-cmdline-params.patch queue-4.9/x86-kaiser-move-feature-detection-up.patch