Merge tag 'x86_urgent_for_v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:

- Mark serialize() noinstr so that it can be used from instrumentation-
free code

- Make sure FRED's RSP0 MSR is synchronized with its corresponding
per-CPU value in order to avoid double faults in hotplug scenarios

- Disable EXECMEM_ROX on x86 for now because it didn't receive proper
x86 maintainers review, went in and broke a bunch of things

* tag 'x86_urgent_for_v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/asm: Make serialize() always_inline
x86/fred: Fix the FRED RSP0 MSR out of sync with its per-CPU cache
x86: Disable EXECMEM_ROX support

Changed files
+8 -3
arch
x86
include
kernel
-1
arch/x86/Kconfig
··· 83 83 select ARCH_HAS_DMA_OPS if GART_IOMMU || XEN 84 84 select ARCH_HAS_EARLY_DEBUG if KGDB 85 85 select ARCH_HAS_ELF_RANDOMIZE 86 - select ARCH_HAS_EXECMEM_ROX if X86_64 87 86 select ARCH_HAS_FAST_MULTIPLIER 88 87 select ARCH_HAS_FORTIFY_SOURCE 89 88 select ARCH_HAS_GCOV_PROFILE_ALL
+1 -1
arch/x86/include/asm/special_insns.h
··· 217 217 218 218 #define nop() asm volatile ("nop") 219 219 220 - static inline void serialize(void) 220 + static __always_inline void serialize(void) 221 221 { 222 222 /* Instruction opcode for SERIALIZE; supported in binutils >= 2.35. */ 223 223 asm volatile(".byte 0xf, 0x1, 0xe8" ::: "memory");
+7 -1
arch/x86/kernel/fred.c
··· 50 50 FRED_CONFIG_ENTRYPOINT(asm_fred_entrypoint_user)); 51 51 52 52 wrmsrl(MSR_IA32_FRED_STKLVLS, 0); 53 - wrmsrl(MSR_IA32_FRED_RSP0, 0); 53 + 54 + /* 55 + * Ater a CPU offline/online cycle, the FRED RSP0 MSR should be 56 + * resynchronized with its per-CPU cache. 57 + */ 58 + wrmsrl(MSR_IA32_FRED_RSP0, __this_cpu_read(fred_rsp0)); 59 + 54 60 wrmsrl(MSR_IA32_FRED_RSP1, 0); 55 61 wrmsrl(MSR_IA32_FRED_RSP2, 0); 56 62 wrmsrl(MSR_IA32_FRED_RSP3, 0);