Merge tag 'x86_entry_for_6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 entry update from Dave Hansen:
 "This one is pretty trivial: fix a badly-named FRED data structure
  member"

* tag 'x86_entry_for_6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/fred: Fix 64bit identifier in fred_ss
This commit is contained in:
Linus Torvalds
2025-12-02 14:24:21 -08:00
3 changed files with 5 additions and 5 deletions

View File

@@ -78,13 +78,13 @@ static noinstr void fred_intx(struct pt_regs *regs)
static __always_inline void fred_other(struct pt_regs *regs) static __always_inline void fred_other(struct pt_regs *regs)
{ {
/* The compiler can fold these conditions into a single test */ /* The compiler can fold these conditions into a single test */
if (likely(regs->fred_ss.vector == FRED_SYSCALL && regs->fred_ss.lm)) { if (likely(regs->fred_ss.vector == FRED_SYSCALL && regs->fred_ss.l)) {
regs->orig_ax = regs->ax; regs->orig_ax = regs->ax;
regs->ax = -ENOSYS; regs->ax = -ENOSYS;
do_syscall_64(regs, regs->orig_ax); do_syscall_64(regs, regs->orig_ax);
return; return;
} else if (ia32_enabled() && } else if (ia32_enabled() &&
likely(regs->fred_ss.vector == FRED_SYSENTER && !regs->fred_ss.lm)) { likely(regs->fred_ss.vector == FRED_SYSENTER && !regs->fred_ss.l)) {
regs->orig_ax = regs->ax; regs->orig_ax = regs->ax;
regs->ax = -ENOSYS; regs->ax = -ENOSYS;
do_fast_syscall_32(regs); do_fast_syscall_32(regs);

View File

@@ -79,7 +79,7 @@ static __always_inline void fred_entry_from_kvm(unsigned int type, unsigned int
.type = type, .type = type,
.vector = vector, .vector = vector,
.nmi = type == EVENT_TYPE_NMI, .nmi = type == EVENT_TYPE_NMI,
.lm = 1, .l = 1,
}; };
asm_fred_entry_from_kvm(ss); asm_fred_entry_from_kvm(ss);

View File

@@ -84,8 +84,8 @@ struct fred_ss {
: 4, : 4,
/* Event was incident to enclave execution */ /* Event was incident to enclave execution */
enclave : 1, enclave : 1,
/* CPU was in long mode */ /* CPU was in 64-bit mode */
lm : 1, l : 1,
/* /*
* Nested exception during FRED delivery, not set * Nested exception during FRED delivery, not set
* for #DF. * for #DF.