linux/arch/x86/entry
Andrew Cooper aa280a08e7 x86/fred: Correct speculative safety in fred_extint()
array_index_nospec() is no use if the result gets spilled to the stack, as
it makes the believed safe-under-speculation value subject to memory
predictions.

For all practical purposes, this means array_index_nospec() must be used in
the expression that accesses the array.

As the code currently stands, it's the wrong side of irqentry_enter(), and
'index' is put into %ebp across the function call.

Remove the index variable and reposition array_index_nospec(), so it's
calculated immediately before the array access.

Fixes: 14619d912b ("x86/fred: FRED entry/exit and dispatch code")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260106131504.679932-1-andrew.cooper3@citrix.com
2026-02-23 11:19:11 +01:00
..
syscalls rseq: Implement sys_rseq_slice_yield() 2026-01-22 11:11:17 +01:00
vdso x86: keep legacy generated vdso files around in .gitignore file 2026-02-10 20:03:30 -08:00
vsyscall x86/paravirt: Remove not needed includes of paravirt.h 2026-01-12 11:26:52 +01:00
calling.h x86/fred: Play nice with invoking asm_fred_entry_from_kvm() on non-FRED hardware 2025-08-18 14:23:08 +02:00
entry.S * Make MSR-induced taint easier for users to track down 2025-12-02 14:16:42 -08:00
entry_32.S x86/percpu: Move top_of_stack to percpu hot section 2025-03-04 20:30:33 +01:00
entry_64.S x86/paravirt: Remove not needed includes of paravirt.h 2026-01-12 11:26:52 +01:00
entry_64_compat.S x86/percpu: Move top_of_stack to percpu hot section 2025-03-04 20:30:33 +01:00
entry_64_fred.S x86: Restrict KVM-induced symbol exports to KVM modules where obvious/possible 2025-11-12 15:29:38 -08:00
entry_fred.c x86/fred: Correct speculative safety in fred_extint() 2026-02-23 11:19:11 +01:00
Makefile x86/syscall: Move sys_ni_syscall() 2025-03-19 11:19:17 +01:00
syscall_32.c x86/entry/vdso: Rename vdso_image_* to vdso*_image 2026-01-13 15:33:20 -08:00
syscall_64.c x86/syscall: Remove stray semicolons 2025-03-19 11:19:18 +01:00
thunk.S x86/entry: Merge thunk_64.S and thunk_32.S into thunk.S 2024-04-09 09:57:56 +02:00