linux-stable/arch/x86
Kirill A. Shutemov 70539e9bc0 x86/traps: Fix load_unaligned_zeropad() handling for shared TDX memory
[ Upstream commit 9f91164061 ]

Commit c4e34dd99f ("x86: simplify load_unaligned_zeropad()
implementation") changes how exceptions around load_unaligned_zeropad()
handled.  The kernel now uses the fault_address in fixup_exception() to
verify the address calculations for the load_unaligned_zeropad().

It works fine for #PF, but breaks on #VE since no fault address is
passed down to fixup_exception().

Propagating ve_info.gla down to fixup_exception() resolves the issue.

See commit 1e7769653b ("x86/tdx: Handle load_unaligned_zeropad()
page-cross to a shared page") for more context.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Michael Kelley <mikelley@microsoft.com>
Fixes: c4e34dd99f ("x86: simplify load_unaligned_zeropad() implementation")
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-03 10:25:52 +02:00
..
boot * Do conditional __tdx_hypercall() 'output' processing via an 2023-04-28 09:36:09 -07:00
coco x86/tdx: Fix race between set_memory_encrypted() and load_unaligned_zeropad() 2023-07-19 16:35:14 +02:00
configs
crypto This push fixes an alignment crash in x86/aria. 2023-05-29 07:05:49 -04:00
entry Objtool changes for v6.4: 2023-04-28 14:02:54 -07:00
events perf/x86: Fix lockdep warning in for_each_sibling_event() on SPR 2023-07-23 13:54:10 +02:00
hyperv x86/hyperv: Set MTRR state when running as SEV-SNP Hyper-V guest 2023-07-19 16:35:18 +02:00
ia32
include x86/cpu/amd: Add a Zenbleed fix 2023-07-24 18:56:41 +02:00
kernel x86/traps: Fix load_unaligned_zeropad() handling for shared TDX memory 2023-08-03 10:25:52 +02:00
kvm KVM: x86: Bail from kvm_recalculate_phys_map() if x2APIC ID is out-of-bounds 2023-06-02 17:20:50 -07:00
lib x86: re-introduce support for ERMS copies for user space accesses 2023-05-26 12:34:20 -07:00
math-emu
mm x86/mm: Allow guest.enc_status_change_prepare() to fail 2023-07-19 16:35:14 +02:00
net bpf: Fix a bpf_jit_dump issue for x86_64 with sysctl bpf_jit_enable. 2023-06-12 16:47:18 +02:00
pci xen: branch for v6.4-rc4 2023-05-27 09:42:56 -07:00
platform x86/efi: Make efi_set_virtual_address_map IBT safe 2023-07-19 16:36:25 +02:00
power x86/cpu: Mark {hlt,resume}_play_dead() __noreturn 2023-04-14 17:31:27 +02:00
purgatory x86/purgatory: remove PGO flags 2023-06-12 11:31:50 -07:00
ras
realmode
tools ELF: fix all "Elf" typos 2023-04-08 13:45:37 -07:00
um um: make stub data pages size tweakable 2023-04-20 23:08:43 +02:00
video
virt/vmx/tdx
xen x86/xen: Set MTRR state when running as Xen PV initial domain 2023-07-19 16:35:18 +02:00
.gitignore
Kbuild
Kconfig mm: introduce new 'lock_mm_and_find_vma()' page fault helper 2023-07-01 13:12:38 +02:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug docs: move x86 documentation into Documentation/arch/ 2023-03-30 12:58:51 -06:00
Makefile x86/unwind/orc: Add ELF section with ORC version identifier 2023-06-16 17:17:42 +02:00
Makefile.um um: Only disable SSE on clang to work around old GCC bugs 2023-04-04 09:57:05 +02:00
Makefile_32.cpu