linux-stable/arch
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
..
alpha mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:12:39 +02:00
arc ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard 2023-07-19 16:36:19 +02:00
arm ARM: orion5x: fix d2net gpio initialization 2023-07-19 16:36:58 +02:00
arm64 KVM: arm64: Handle kvm_arm_init failure correctly in finalize_pkvm 2023-08-03 10:25:41 +02:00
csky csky: fix up lock_mm_and_find_vma() conversion 2023-07-01 13:12:41 +02:00
hexagon mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:12:39 +02:00
ia64 ia64: mmap: Consider pgoff when searching for free mapping 2023-07-27 08:56:36 +02:00
loongarch LoongArch: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation 2023-07-19 16:37:00 +02:00
m68k mm: always expand the stack with the mmap write lock held 2023-07-01 13:12:40 +02:00
microblaze mm: always expand the stack with the mmap write lock held 2023-07-01 13:12:40 +02:00
mips MIPS: dec: prom: Address -Warray-bounds warning 2023-07-27 08:56:44 +02:00
nios2 mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:12:39 +02:00
openrisc openrisc: Union fpcsr and oldmask in sigcontext to unbreak userspace ABI 2023-07-23 13:53:45 +02:00
parisc io_uring: Fix io_uring mmap() by using architecture-provided get_unmapped_area() 2023-07-27 08:56:31 +02:00
powerpc powerpc/pseries/vas: Hold mmap_mutex after mmap lock during window close 2023-08-03 10:25:41 +02:00
riscv riscv: mm: fix truncation warning on RV32 2023-07-23 13:53:48 +02:00
s390 s390/mm: fix per vma lock fault handling 2023-08-03 10:25:42 +02:00
sh sh: hd64461: Handle virq offset for offchip IRQ base and HD64461 IRQ 2023-07-19 16:37:03 +02:00
sparc watchdog/hardlockup: rename some "NMI watchdog" constants/function 2023-07-19 16:35:32 +02:00
um um: Use HOST_DIR for mrproper 2023-07-19 16:36:53 +02:00
x86 x86/traps: Fix load_unaligned_zeropad() handling for shared TDX memory 2023-08-03 10:25:52 +02:00
xtensa xtensa: ISS: fix call to split_if_spec 2023-07-23 13:54:10 +02:00
.gitignore
Kconfig lazy tlb: shoot lazies, non-refcounting lazy tlb mm reference handling scheme 2023-03-28 16:20:08 -07:00