Commit 11d8f542 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branch 'x86/alternatives' into x86/core, to merge dependent commits

Prepare to resolve conflicts with an upstream series of fixes that conflict
with pending x86 changes:

  6f5bf947 Merge tag 'its-for-linus-20250509' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip



Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 82f2b0b9 7f995823
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -477,7 +477,7 @@ void *text_poke_copy(void *addr, const void *opcode, size_t len)
	return text_poke(addr, opcode, len);
}

void text_poke_sync(void)
void smp_text_poke_sync_each_cpu(void)
{
}

+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ config X86
	select ARCH_WANT_HUGETLB_VMEMMAP_PREINIT if X86_64
	select ARCH_WANTS_THP_SWAP		if X86_64
	select ARCH_HAS_PARANOID_L1D_FLUSH
	select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
	select BUILDTIME_TABLE_SORT
	select CLKEVT_I8253
	select CLOCKSOURCE_WATCHDOG
+8 −1
Original line number Diff line number Diff line
@@ -2803,8 +2803,15 @@ static unsigned long get_segment_base(unsigned int segment)
#ifdef CONFIG_MODIFY_LDT_SYSCALL
		struct ldt_struct *ldt;

		/*
		 * If we're not in a valid context with a real (not just lazy)
		 * user mm, then don't even try.
		 */
		if (!nmi_uaccess_okay())
			return 0;

		/* IRQs are off, so this synchronizes with smp_store_release */
		ldt = READ_ONCE(current->active_mm->context.ldt);
		ldt = smp_load_acquire(&current->mm->context.ldt);
		if (!ldt || idx >= ldt->nr_entries)
			return 0;

+6 −5
Original line number Diff line number Diff line
@@ -82,6 +82,12 @@ struct alt_instr {

extern struct alt_instr __alt_instructions[], __alt_instructions_end[];

extern s32 __retpoline_sites[], __retpoline_sites_end[];
extern s32 __return_sites[],	__return_sites_end[];
extern s32 __cfi_sites[],	__cfi_sites_end[];
extern s32 __ibt_endbr_seal[],	__ibt_endbr_seal_end[];
extern s32 __smp_locks[],	__smp_locks_end[];

/*
 * Debug flag that can be tested to see whether alternative
 * instructions were patched in already:
@@ -335,11 +341,6 @@ void nop_func(void);
	__ALTERNATIVE(\oldinstr, \newinstr, \ft_flags)
.endm

#define old_len			141b-140b
#define new_len1		144f-143f
#define new_len2		145f-144f
#define new_len3		146f-145f

/*
 * Same as ALTERNATIVE macro above but for two alternatives. If CPU
 * has @feature1, it replaces @oldinstr with @newinstr1. If CPU has
+2 −2
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@
#define MM_CONTEXT_LOCK_LAM		2
/* Allow LAM and SVA coexisting */
#define MM_CONTEXT_FORCE_TAGGED_SVA	3
/* Tracks mm_cpumask */
#define MM_CONTEXT_NOTRACK		4

/*
 * x86 has arch-specific MMU state beyond what lives in mm_struct.
@@ -44,9 +46,7 @@ typedef struct {
	struct ldt_struct	*ldt;
#endif

#ifdef CONFIG_X86_64
	unsigned long flags;
#endif

#ifdef CONFIG_ADDRESS_MASKING
	/* Active LAM mode:  X86_CR3_LAM_U48 or X86_CR3_LAM_U57 or 0 (disabled) */
Loading