linux-imx/arch
Uros Bizjak 94111446fa x86/fpu: Fix AMD X86_BUG_FXSAVE_LEAK fixup
[ Upstream commit 5d31174f3c ]

The assembly snippet in restore_fpregs_from_fpstate() that implements
X86_BUG_FXSAVE_LEAK fixup loads the value from a random variable,
preferably the one that is already in the L1 cache.

However, the access to fpinit_state via *fpstate pointer is not
implemented correctly. The "m" asm constraint requires dereferenced
pointer variable, otherwise the compiler just reloads the value
via temporary stack slot. The current asm code reflects this:

     mov    %rdi,(%rsp)
     ...
     fildl  (%rsp)

With dereferenced pointer variable, the code does what the
comment above the asm snippet says:

     fildl  (%rdi)

Also, remove the pointless %P operand modifier. The modifier is
ineffective on non-symbolic references - it was used to prevent
%rip-relative addresses in .altinstr sections, but FILDL in the
.text section can use %rip-relative addresses without problems.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20240315081849.5187-1-ubizjak@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 09:33:51 +02:00
..
alpha vgacon: rework screen_info #ifdef checks 2024-06-27 13:49:15 +02:00
arc ARC: [plat-hsdk]: Remove misplaced interrupt-cells property 2024-05-02 16:32:33 +02:00
arm bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro() 2024-07-05 09:33:50 +02:00
arm64 arm64: dts: imx8qm-mek: fix gpio number for reg_usdhc2_vmmc 2024-06-27 13:49:13 +02:00
csky kprobe/ftrace: bail out if ftrace was killed 2024-06-27 13:49:03 +02:00
hexagon hexagon: vmlinux.lds.S: handle attributes section 2024-04-03 15:28:55 +02:00
ia64 vgacon: rework screen_info #ifdef checks 2024-06-27 13:49:15 +02:00
loongarch bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro() 2024-07-05 09:33:50 +02:00
m68k m68k: mac: Fix reboot hang on Mac IIci 2024-06-12 11:11:51 +02:00
microblaze microblaze: Remove early printk call from cpuinfo-static.c 2024-06-12 11:12:23 +02:00
mips bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro() 2024-07-05 09:33:50 +02:00
nios2 mm: Introduce flush_cache_vmap_early() 2024-02-16 19:10:52 +01:00
openrisc openrisc: traps: Don't send signals to kernel mode threads 2024-06-12 11:11:42 +02:00
parisc bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro() 2024-07-05 09:33:50 +02:00
powerpc powerpc/bpf: use bpf_jit_binary_pack_[alloc|finalize|free] 2024-07-05 09:33:50 +02:00
riscv vgacon: rework screen_info #ifdef checks 2024-06-27 13:49:15 +02:00
s390 bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro() 2024-07-05 09:33:50 +02:00
sh Revert "sh: Handle calling csum_partial with misaligned data" 2024-06-12 11:11:48 +02:00
sparc bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro() 2024-07-05 09:33:50 +02:00
um um: Fix the declaration of kasan_map_memory 2024-06-12 11:12:42 +02:00
x86 x86/fpu: Fix AMD X86_BUG_FXSAVE_LEAK fixup 2024-07-05 09:33:51 +02:00
xtensa xtensa: fix MAKE_PC_FROM_RA second argument 2024-05-17 12:02:32 +02:00
.gitignore
Kconfig Revert "mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default" 2024-06-27 13:49:15 +02:00