Commit c5a3d3c0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'x86_cpu_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 CPU feature updates from Borislav Petkov:

 - Remove a bunch of chicken bit options to turn off CPU features which
   are not really needed anymore

 - Misc fixes and cleanups

* tag 'x86_cpu_for_v5.19_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/speculation: Add missing prototype for unpriv_ebpf_notify()
  x86/pm: Fix false positive kmemleak report in msr_build_context()
  x86/speculation/srbds: Do not try to turn mitigation off when not supported
  x86/cpu: Remove "noclflush"
  x86/cpu: Remove "noexec"
  x86/cpu: Remove "nosmep"
  x86/cpu: Remove CONFIG_X86_SMAP and "nosmap"
  x86/cpu: Remove "nosep"
  x86/cpu: Allow feature bit names from /proc/cpuinfo in clearcpuid=
parents 3a755ebc 2147c438
Loading
Loading
Loading
Loading
+10 −14
Original line number Diff line number Diff line
@@ -631,12 +631,17 @@
			Defaults to zero when built as a module and to
			10 seconds when built into the kernel.

	clearcpuid=BITNUM[,BITNUM...] [X86]
	clearcpuid=X[,X...] [X86]
			Disable CPUID feature X for the kernel. See
			arch/x86/include/asm/cpufeatures.h for the valid bit
			numbers. Note the Linux specific bits are not necessarily
			stable over kernel options, but the vendor specific
			numbers X. Note the Linux-specific bits are not necessarily
			stable over kernel options, but the vendor-specific
			ones should be.
			X can also be a string as appearing in the flags: line
			in /proc/cpuinfo which does not have the above
			instability issue. However, not all features have names
			in /proc/cpuinfo.
			Note that using this option will taint your kernel.
			Also note that user programs calling CPUID directly
			or using the feature without checking anything
			will still see it. This just prevents it from
@@ -3478,8 +3483,6 @@

	nocache		[ARM]

	noclflush	[BUGS=X86] Don't use the CLFLUSH instruction

	delayacct	[KNL] Enable per-task delay accounting

	nodsp		[SH] Disable hardware DSP at boot time.
@@ -3490,16 +3493,11 @@

	noexec		[IA-64]

	noexec		[X86]
			On X86-32 available only on PAE configured kernels.
			noexec=on: enable non-executable mappings (default)
			noexec=off: disable non-executable mappings

	nosmap		[X86,PPC]
	nosmap		[PPC]
			Disable SMAP (Supervisor Mode Access Prevention)
			even if it is supported by processor.

	nosmep		[X86,PPC64s]
	nosmep		[PPC64s]
			Disable SMEP (Supervisor Mode Execution Prevention)
			even if it is supported by processor.

@@ -3699,8 +3697,6 @@

	nosbagart	[IA-64]

	nosep		[BUGS=X86-32] Disables x86 SYSENTER/SYSEXIT support.

	nosgx		[X86-64,SGX] Disables Intel SGX kernel support.

	nosmp		[SMP] Tells an SMP kernel to act as a UP kernel,
+2 −3
Original line number Diff line number Diff line
@@ -140,9 +140,8 @@ from #define X86_FEATURE_UMIP (16*32 + 2).

In addition, there exists a variety of custom command-line parameters that
disable specific features. The list of parameters includes, but is not limited
to, nofsgsbase, nosmap, and nosmep. 5-level paging can also be disabled using
"no5lvl". SMAP and SMEP are disabled with the aforementioned parameters,
respectively.
to, nofsgsbase, nosgx, noxsave, etc. 5-level paging can also be disabled using
"no5lvl".

e: The feature was known to be non-functional.
----------------------------------------------
+0 −9
Original line number Diff line number Diff line
@@ -157,15 +157,6 @@ Rebooting
     newer BIOS, or newer board) using this option will ignore the built-in
     quirk table, and use the generic default reboot actions.

Non Executable Mappings
=======================

  noexec=on|off
    on
      Enable(default)
    off
      Disable

NUMA
====

+0 −11
Original line number Diff line number Diff line
@@ -1831,17 +1831,6 @@ config ARCH_RANDOM
	  If supported, this is a high bandwidth, cryptographically
	  secure hardware random number generator.

config X86_SMAP
	def_bool y
	prompt "Supervisor Mode Access Prevention" if EXPERT
	help
	  Supervisor Mode Access Prevention (SMAP) is a security
	  feature in newer Intel processors.  There is a small
	  performance cost if this enabled and turned on; there is
	  also a small increase in the kernel size if this is enabled.

	  If unsure, say Y.

config X86_UMIP
	def_bool y
	prompt "User Mode Instruction Prevention" if EXPERT
+5 −2
Original line number Diff line number Diff line
@@ -34,14 +34,17 @@ enum cpuid_leafs
	CPUID_8000_001F_EAX,
};

#define X86_CAP_FMT_NUM "%d:%d"
#define x86_cap_flag_num(flag) ((flag) >> 5), ((flag) & 31)

#ifdef CONFIG_X86_FEATURE_NAMES
extern const char * const x86_cap_flags[NCAPINTS*32];
extern const char * const x86_power_flags[32];
#define X86_CAP_FMT "%s"
#define x86_cap_flag(flag) x86_cap_flags[flag]
#else
#define X86_CAP_FMT "%d:%d"
#define x86_cap_flag(flag) ((flag) >> 5), ((flag) & 31)
#define X86_CAP_FMT X86_CAP_FMT_NUM
#define x86_cap_flag x86_cap_flag_num
#endif

/*
Loading