Commit 941d77c7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull x86 cpu updates from Borislav Petkov:

 - Compute the purposeful misalignment of zen_untrain_ret automatically
   and assert __x86_return_thunk's alignment so that future changes to
   the symbol macros do not accidentally break them.

 - Remove CONFIG_X86_FEATURE_NAMES Kconfig option as its existence is
   pointless

* tag 'x86_cpu_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/retbleed: Add __x86_return_thunk alignment checks
  x86/cpu: Remove X86_FEATURE_NAMES
  x86/Kconfig: Make X86_FEATURE_NAMES non-configurable in prompt
parents 2c96136a f220125b
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -294,7 +294,6 @@ config X86
	select TRACE_IRQFLAGS_NMI_SUPPORT
	select USER_STACKTRACE_SUPPORT
	select HAVE_ARCH_KCSAN			if X86_64
	select X86_FEATURE_NAMES		if PROC_FS
	select PROC_PID_ARCH_STATUS		if PROC_FS
	select HAVE_ARCH_NODE_DEV_GROUP		if X86_SGX
	select FUNCTION_ALIGNMENT_16B		if X86_64 || X86_ALIGNMENT_16
@@ -444,17 +443,6 @@ config SMP

	  If you don't know what to do here, say N.

config X86_FEATURE_NAMES
	bool "Processor feature human-readable names" if EMBEDDED
	default y
	help
	  This option compiles in a table of x86 feature bits and corresponding
	  names.  This is required to support /proc/cpuinfo and a few kernel
	  messages.  You can disable this to save space, at the expense of
	  making those few kernel messages show numeric feature bits instead.

	  If in doubt, say Y.

config X86_X2APIC
	bool "Support x2apic"
	depends on X86_LOCAL_APIC && X86_64 && (IRQ_REMAP || HYPERVISOR_GUEST)
+1 −1
Original line number Diff line number Diff line
@@ -389,7 +389,7 @@ config IA32_FEAT_CTL

config X86_VMX_FEATURE_NAMES
	def_bool y
	depends on IA32_FEAT_CTL && X86_FEATURE_NAMES
	depends on IA32_FEAT_CTL

menuconfig PROCESSOR_SELECT
	bool "Supported processor vendors" if EXPERT
+0 −2
Original line number Diff line number Diff line
@@ -55,14 +55,12 @@ HOST_EXTRACFLAGS += -I$(srctree)/tools/include \
		    -include include/generated/autoconf.h \
	            -D__EXPORTED_HEADERS__

ifdef CONFIG_X86_FEATURE_NAMES
$(obj)/cpu.o: $(obj)/cpustr.h

quiet_cmd_cpustr = CPUSTR  $@
      cmd_cpustr = $(obj)/mkcpustr > $@
$(obj)/cpustr.h: $(obj)/mkcpustr FORCE
	$(call if_changed,cpustr)
endif
targets += cpustr.h

# ---------------------------------------------------------------------------
+0 −13
Original line number Diff line number Diff line
@@ -14,9 +14,7 @@
 */

#include "boot.h"
#ifdef CONFIG_X86_FEATURE_NAMES
#include "cpustr.h"
#endif

static char *cpu_name(int level)
{
@@ -35,7 +33,6 @@ static char *cpu_name(int level)
static void show_cap_strs(u32 *err_flags)
{
	int i, j;
#ifdef CONFIG_X86_FEATURE_NAMES
	const unsigned char *msg_strs = (const unsigned char *)x86_cap_strs;
	for (i = 0; i < NCAPINTS; i++) {
		u32 e = err_flags[i];
@@ -58,16 +55,6 @@ static void show_cap_strs(u32 *err_flags)
			e >>= 1;
		}
	}
#else
	for (i = 0; i < NCAPINTS; i++) {
		u32 e = err_flags[i];
		for (j = 0; j < 32; j++) {
			if (e & 1)
				printf("%d:%d ", i, j);
			e >>= 1;
		}
	}
#endif
}

int validate_cpu(void)
+0 −5
Original line number Diff line number Diff line
@@ -38,15 +38,10 @@ enum cpuid_leafs
#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 X86_CAP_FMT_NUM
#define x86_cap_flag x86_cap_flag_num
#endif

/*
 * In order to save room, we index into this array by doing
Loading