Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 899ba795 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "Speculation:

   - Make the microcode check more robust

   - Make the L1TF memory limit depend on the internal cache physical
     address space and not on the CPUID advertised physical address
     space, which might be significantly smaller. This avoids disabling
     L1TF on machines which utilize the full physical address space.

   - Fix the GDT mapping for EFI calls on 32bit PTI

   - Fix the MCE nospec implementation to prevent #GP

  Fixes and robustness:

   - Use the proper operand order for LSL in the VDSO

   - Prevent NMI uaccess race against CR3 switching

   - Add a lockdep check to verify that text_mutex is held in
     text_poke() functions

   - Repair the fallout of giving native_restore_fl() a prototype

   - Prevent kernel memory dumps based on usermode RIP

   - Wipe KASAN shadow stack before rewinding the stack to prevent false
     positives

   - Move the AMS GOTO enforcement to the actual build stage to allow
     user API header extraction without a compiler

   - Fix a section mismatch introduced by the on demand VDSO mapping
     change

  Miscellaneous:

   - Trivial typo, GCC quirk removal and CC_SET/OUT() cleanups"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/pti: Fix section mismatch warning/error
  x86/vdso: Fix lsl operand order
  x86/mce: Fix set_mce_nospec() to avoid #GP fault
  x86/efi: Load fixmap GDT in efi_call_phys_epilog()
  x86/nmi: Fix NMI uaccess race against CR3 switching
  x86: Allow generating user-space headers without a compiler
  x86/dumpstack: Don't dump kernel memory based on usermode RIP
  x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember()
  x86/alternatives: Lockdep-enforce text_mutex in text_poke*()
  x86/entry/64: Wipe KASAN stack shadow before rewind_stack_do_exit()
  x86/irqflags: Mark native_restore_fl extern inline
  x86/build: Remove jump label quirk for GCC older than 4.5.2
  x86/Kconfig: Fix trivial typo
  x86/speculation/l1tf: Increase l1tf memory limit for Nehalem+
  x86/spectre: Add missing family 6 check to microcode check
parents 1395d109 ff924c5a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2843,7 +2843,7 @@ config X86_SYSFB
	  This option, if enabled, marks VGA/VBE/EFI framebuffers as generic
	  framebuffers so the new generic system-framebuffer drivers can be
	  used on x86. If the framebuffer is not compatible with the generic
	  modes, it is adverticed as fallback platform framebuffer so legacy
	  modes, it is advertised as fallback platform framebuffer so legacy
	  drivers like efifb, vesafb and uvesafb can pick it up.
	  If this option is not selected, all system framebuffers are always
	  marked as fallback platform framebuffers as usual.
+7 −16
Original line number Diff line number Diff line
@@ -175,22 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
  endif
endif

ifndef CC_HAVE_ASM_GOTO
  $(error Compiler lacks asm-goto support.)
endif

#
# Jump labels need '-maccumulate-outgoing-args' for gcc < 4.5.2 to prevent a
# GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46226).  There's no way
# to test for this bug at compile-time because the test case needs to execute,
# which is a no-go for cross compilers.  So check the GCC version instead.
#
ifdef CONFIG_JUMP_LABEL
  ifneq ($(ACCUMULATE_OUTGOING_ARGS), 1)
	ACCUMULATE_OUTGOING_ARGS = $(call cc-if-fullversion, -lt, 040502, 1)
  endif
endif

ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
	# This compiler flag is not supported by Clang:
	KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
@@ -312,6 +296,13 @@ PHONY += vdso_install
vdso_install:
	$(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@

archprepare: checkbin
checkbin:
ifndef CC_HAVE_ASM_GOTO
	@echo Compiler lacks asm-goto support.
	@exit 1
endif

archclean:
	$(Q)rm -rf $(objtree)/arch/i386
	$(Q)rm -rf $(objtree)/arch/x86_64
+1 −1
Original line number Diff line number Diff line
@@ -2465,7 +2465,7 @@ perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs

	perf_callchain_store(entry, regs->ip);

	if (!current->mm)
	if (!nmi_uaccess_okay())
		return;

	if (perf_callchain_user32(regs, entry))
+2 −1
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ extern inline unsigned long native_save_fl(void)
	return flags;
}

static inline void native_restore_fl(unsigned long flags)
extern inline void native_restore_fl(unsigned long flags);
extern inline void native_restore_fl(unsigned long flags)
{
	asm volatile("push %0 ; popf"
		     : /* no output */
+3 −1
Original line number Diff line number Diff line
@@ -132,6 +132,8 @@ struct cpuinfo_x86 {
	/* Index into per_cpu list: */
	u16			cpu_index;
	u32			microcode;
	/* Address space bits used by the cache internally */
	u8			x86_cache_bits;
	unsigned		initialized : 1;
} __randomize_layout;

@@ -183,7 +185,7 @@ extern void cpu_detect(struct cpuinfo_x86 *c);

static inline unsigned long long l1tf_pfn_limit(void)
{
	return BIT_ULL(boot_cpu_data.x86_phys_bits - 1 - PAGE_SHIFT);
	return BIT_ULL(boot_cpu_data.x86_cache_bits - 1 - PAGE_SHIFT);
}

extern void early_cpu_init(void);
Loading