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
This commit is contained in:
@@ -83,7 +83,6 @@ config X86
|
||||
select ARCH_HAS_DMA_OPS if GART_IOMMU || XEN
|
||||
select ARCH_HAS_EARLY_DEBUG if KGDB
|
||||
select ARCH_HAS_ELF_RANDOMIZE
|
||||
select ARCH_HAS_EXECMEM_ROX if X86_64
|
||||
select ARCH_HAS_FAST_MULTIPLIER
|
||||
select ARCH_HAS_FORTIFY_SOURCE
|
||||
select ARCH_HAS_GCOV_PROFILE_ALL
|
||||
|
||||
@@ -217,7 +217,7 @@ fail:
|
||||
|
||||
#define nop() asm volatile ("nop")
|
||||
|
||||
static inline void serialize(void)
|
||||
static __always_inline void serialize(void)
|
||||
{
|
||||
/* Instruction opcode for SERIALIZE; supported in binutils >= 2.35. */
|
||||
asm volatile(".byte 0xf, 0x1, 0xe8" ::: "memory");
|
||||
|
||||
@@ -50,7 +50,13 @@ void cpu_init_fred_exceptions(void)
|
||||
FRED_CONFIG_ENTRYPOINT(asm_fred_entrypoint_user));
|
||||
|
||||
wrmsrl(MSR_IA32_FRED_STKLVLS, 0);
|
||||
wrmsrl(MSR_IA32_FRED_RSP0, 0);
|
||||
|
||||
/*
|
||||
* Ater a CPU offline/online cycle, the FRED RSP0 MSR should be
|
||||
* resynchronized with its per-CPU cache.
|
||||
*/
|
||||
wrmsrl(MSR_IA32_FRED_RSP0, __this_cpu_read(fred_rsp0));
|
||||
|
||||
wrmsrl(MSR_IA32_FRED_RSP1, 0);
|
||||
wrmsrl(MSR_IA32_FRED_RSP2, 0);
|
||||
wrmsrl(MSR_IA32_FRED_RSP3, 0);
|
||||
|
||||
Reference in New Issue
Block a user