Patch "init: Invoke init_espfix_bsp() from mm_init()" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
init: Invoke init_espfix_bsp() from mm_init()
to the 4.14-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:
init-invoke-init_espfix_bsp-from-mm_init.patch
and it can be found in the queue-4.14 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
613e396bc0d4c7604fba23256644e78454c68cf6Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <[email protected]>
Date: Sun, 17 Dec 2017 10:56:29 +0100
Subject: init: Invoke init_espfix_bsp() from mm_init()
From: Thomas Gleixner <[email protected]>
commit 613e396bc0d4c7604fba23256644e78454c68cf6 upstream.
init_espfix_bsp() needs to be invoked before the page table isolation initialization. Move it into mm_init() which is the place where pti_init() will be added.
While at it get rid of the #ifdeffery and provide proper stub functions.
--- arch/x86/include/asm/espfix.h | 7 ++++--- arch/x86/kernel/smpboot.c | 6 +----- include/asm-generic/pgtable.h | 5 +++++ init/main.c | 6 ++---- 4 files changed, 12 insertions(+), 12 deletions(-)
arch/x86/include/asm/espfix.h +4 -3
@@ -2,7 +2,7 @@#ifndef _ASM_X86_ESPFIX_H#define _ASM_X86_ESPFIX_H -#ifdef CONFIG_X86_64 +#ifdef CONFIG_X86_ESPFIX64 #include <asm/percpu.h>
@@ -11,7 +11,8 @@ DECLARE_PER_CPU_READ_MOSTLY(unsigned lonextern void init_espfix_bsp (void );extern void init_espfix_ap (int cpu); - -#endif /* CONFIG_X86_64 */ +#else +static inline void init_espfix_ap (int cpu) { } +#endif #endif /* _ASM_X86_ESPFIX_H */
arch/x86/kernel/smpboot.c +1 -5
@@ -990,12 +990,8 @@ static int do_boot_cpu(int apicid, int c initial_code = (unsigned long )start_secondary; initial_stack = idle->thread.sp; -/* -* Enable the espfix hack for this CPU -*/ -#ifdef CONFIG_X86_ESPFIX64 +/* Enable the espfix hack for this CPU */ init_espfix_ap (cpu); -#endif /* So we see what's up */ announce_cpu (cpu, apicid);
include/asm-generic/pgtable.h +5 -0
@@ -1025,6 +1025,11 @@ static inline int pmd_clear_huge(pmd_t *struct file ;int phys_mem_access_prot_allowed (struct file *file,unsigned long pfn,unsigned long size,pgprot_t *vma_prot); + +#ifndef CONFIG_X86_ESPFIX64 +static inline void init_espfix_bsp (void ) { } +#endif +#endif /* !__ASSEMBLY__ */ #ifndef io_remap_pfn_range
init/main.c +2 -4
@@ -504,6 +504,8 @@ static void __init mm_init(void)pgtable_init ();vmalloc_init ();ioremap_huge_init (); +/* Should be run before the first non-init thread is created */ +init_espfix_bsp (); } asmlinkage __visible void __init start_kernel(void)
@@ -674,10 +676,6 @@ asmlinkage __visible void __init start_kif (efi_enabled (EFI_RUNTIME_SERVICES ))efi_enter_virtual_mode ();#endif -#ifdef CONFIG_X86_ESPFIX64 -/* Should be run before the first non-init thread is created */ -init_espfix_bsp (); -#endif thread_stack_cache_init ();cred_init ();fork_init ();
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/x86-entry-rename-sysenter_stack-to-cpu_entry_area_entry_stack.patch queue-4.14/x86-mm-put-mmu-to-hardware-asid-translation-in-one-place.patch queue-4.14/x86-vsyscall-64-explicitly-set-_page_user-in-the-pagetable-hierarchy.patch queue-4.14/x86-uv-use-the-right-tlb-flush-api.patch queue-4.14/x86-decoder-fix-and-update-the-opcodes-map.patch queue-4.14/x86-mm-dump_pagetables-check-page_present-for-real.patch queue-4.14/x86-ldt-prevent-ldt-inheritance-on-exec.patch queue-4.14/x86-microcode-dont-abuse-the-tlb-flush-interface.patch queue-4.14/x86-doc-remove-obvious-weirdnesses-from-the-x86-mm-layout-documentation.patch queue-4.14/init-invoke-init_espfix_bsp-from-mm_init.patch queue-4.14/x86-cpu_entry_area-move-it-to-a-separate-unit.patch queue-4.14/x86-vsyscall-64-warn-and-fail-vsyscall-emulation-in-native-mode.patch queue-4.14/x86-mm-create-asm-invpcid.h.patch queue-4.14/x86-cpu_entry_area-prevent-wraparound-in-setup_cpu_entry_area_ptes-on-32bit.patch queue-4.14/x86-mm-remove-superfluous-barriers.patch queue-4.14/x86-ldt-rework-locking.patch queue-4.14/pci-pm-force-devices-to-d0-in-pci_pm_thaw_noirq.patch queue-4.14/arch-mm-allow-arch_dup_mmap-to-fail.patch queue-4.14/x86-cpu_entry_area-move-it-out-of-the-fixmap.patch queue-4.14/tools-headers-sync-objtool-uapi-header.patch queue-4.14/x86-mm-remove-hard-coded-asid-limit-checks.patch queue-4.14/x86-kconfig-limit-nr_cpus-on-32-bit-to-a-sane-amount.patch queue-4.14/objtool-fix-64-bit-build-on-32-bit-host.patch queue-4.14/x86-mm-add-comments-to-clarify-which-tlb-flush-functions-are-supposed-to-flush-what.patch queue-4.14/x86-mm-move-the-cr3-construction-functions-to-tlbflush.h.patch queue-4.14/x86-mm-dump_pagetables-make-the-address-hints-correct-and-readable.patch queue-4.14/x86-insn-eval-add-utility-functions-to-get-segment-selector.patch queue-4.14/objtool-move-synced-files-to-their-original-relative-locations.patch queue-4.14/x86-mm-use-__flush_tlb_one-for-kernel-memory.patch queue-4.14/objtool-move-kernel-headers-code-sync-check-to-a-script.patch queue-4.14/x86-mm-64-improve-the-memory-map-documentation.patch queue-4.14/objtool-fix-cross-build.patch