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

Merge tag 'x86-urgent-2025-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull misc x86 fixes from Ingo Molnar:

 - Limit AMD microcode Entrysign sha256 signature checking to
   known CPU generations

 - Disable AMD RDSEED32 on certain Zen5 CPUs that have a
   microcode version before when the microcode-based fix was
   issued for the AMD-SB-7055 erratum

 - Fix FPU AMD XFD state synchronization on signal delivery

 - Fix (work around) a SSE4a-disassembly related build failure
   on X86_NATIVE_CPU=y builds

 - Extend the AMD Zen6 model space with a new range of models

 - Fix <asm/intel-family.h> CPU model comments

 - Fix the CONFIG_CFI=y and CONFIG_LTO_CLANG_FULL=y build, which
   was unhappy due to missing kCFI type annotations of clear_page()
   variants

* tag 'x86-urgent-2025-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm: Ensure clear_page() variants always have __kcfi_typeid_ symbols
  x86/cpu: Add/fix core comments for {Panther,Nova} Lake
  x86/CPU/AMD: Extend Zen6 model range
  x86/build: Disable SSE4a
  x86/fpu: Ensure XFD state on signal delivery
  x86/CPU/AMD: Add RDSEED fix for Zen5
  x86/microcode/AMD: Limit Entrysign signature checking to known generations
parents f9bc8e09 9b041a4b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ export BITS
#
#    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
#
KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx
KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-sse4a
KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json
KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2

+3 −3
Original line number Diff line number Diff line
@@ -150,12 +150,12 @@

#define INTEL_LUNARLAKE_M		IFM(6, 0xBD) /* Lion Cove / Skymont */

#define INTEL_PANTHERLAKE_L		IFM(6, 0xCC) /* Cougar Cove / Crestmont */
#define INTEL_PANTHERLAKE_L		IFM(6, 0xCC) /* Cougar Cove / Darkmont */

#define INTEL_WILDCATLAKE_L		IFM(6, 0xD5)

#define INTEL_NOVALAKE			IFM(18, 0x01)
#define INTEL_NOVALAKE_L		IFM(18, 0x03)
#define INTEL_NOVALAKE			IFM(18, 0x01) /* Coyote Cove / Arctic Wolf */
#define INTEL_NOVALAKE_L		IFM(18, 0x03) /* Coyote Cove / Arctic Wolf */

/* "Small Core" Processors (Atom/E-Core) */

+3 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@ extern unsigned long __phys_addr_symbol(unsigned long);
void clear_page_orig(void *page);
void clear_page_rep(void *page);
void clear_page_erms(void *page);
KCFI_REFERENCE(clear_page_orig);
KCFI_REFERENCE(clear_page_rep);
KCFI_REFERENCE(clear_page_erms);

static inline void clear_page(void *page)
{
+11 −1
Original line number Diff line number Diff line
@@ -516,7 +516,7 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
			setup_force_cpu_cap(X86_FEATURE_ZEN5);
			break;
		case 0x50 ... 0x5f:
		case 0x90 ... 0xaf:
		case 0x80 ... 0xaf:
		case 0xc0 ... 0xcf:
			setup_force_cpu_cap(X86_FEATURE_ZEN6);
			break;
@@ -1035,8 +1035,18 @@ static void init_amd_zen4(struct cpuinfo_x86 *c)
	}
}

static const struct x86_cpu_id zen5_rdseed_microcode[] = {
	ZEN_MODEL_STEP_UCODE(0x1a, 0x02, 0x1, 0x0b00215a),
	ZEN_MODEL_STEP_UCODE(0x1a, 0x11, 0x0, 0x0b101054),
};

static void init_amd_zen5(struct cpuinfo_x86 *c)
{
	if (!x86_match_min_microcode_rev(zen5_rdseed_microcode)) {
		clear_cpu_cap(c, X86_FEATURE_RDSEED);
		msr_clear_bit(MSR_AMD64_CPUID_FN_7, 18);
		pr_emerg_once("RDSEED32 is broken. Disabling the corresponding CPUID bit.\n");
	}
}

static void init_amd(struct cpuinfo_x86 *c)
+19 −1
Original line number Diff line number Diff line
@@ -233,13 +233,31 @@ static bool need_sha_check(u32 cur_rev)
	return true;
}

static bool cpu_has_entrysign(void)
{
	unsigned int fam   = x86_family(bsp_cpuid_1_eax);
	unsigned int model = x86_model(bsp_cpuid_1_eax);

	if (fam == 0x17 || fam == 0x19)
		return true;

	if (fam == 0x1a) {
		if (model <= 0x2f ||
		    (0x40 <= model && model <= 0x4f) ||
		    (0x60 <= model && model <= 0x6f))
			return true;
	}

	return false;
}

static bool verify_sha256_digest(u32 patch_id, u32 cur_rev, const u8 *data, unsigned int len)
{
	struct patch_digest *pd = NULL;
	u8 digest[SHA256_DIGEST_SIZE];
	int i;

	if (x86_family(bsp_cpuid_1_eax) < 0x17)
	if (!cpu_has_entrysign())
		return true;

	if (!need_sha_check(cur_rev))
Loading