Commit 9f91164
x86/traps: Fix load_unaligned_zeropad() handling for shared TDX memory
Commit c4e34dd ("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 1e77696 ("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: c4e34dd ("x86: simplify load_unaligned_zeropad() implementation")
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 0b4a9fd commit 9f91164
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
700 | | - | |
| 700 | + | |
| 701 | + | |
701 | 702 | | |
702 | | - | |
| 703 | + | |
703 | 704 | | |
704 | 705 | | |
705 | 706 | | |
| |||
759 | 760 | | |
760 | 761 | | |
761 | 762 | | |
762 | | - | |
| 763 | + | |
763 | 764 | | |
764 | 765 | | |
765 | 766 | | |
| |||
1357 | 1358 | | |
1358 | 1359 | | |
1359 | 1360 | | |
1360 | | - | |
| 1361 | + | |
| 1362 | + | |
1361 | 1363 | | |
1362 | 1364 | | |
1363 | 1365 | | |
1364 | 1366 | | |
1365 | 1367 | | |
1366 | 1368 | | |
1367 | | - | |
| 1369 | + | |
| 1370 | + | |
1368 | 1371 | | |
| 1372 | + | |
1369 | 1373 | | |
1370 | | - | |
| 1374 | + | |
1371 | 1375 | | |
1372 | 1376 | | |
1373 | 1377 | | |
| |||
1431 | 1435 | | |
1432 | 1436 | | |
1433 | 1437 | | |
1434 | | - | |
| 1438 | + | |
1435 | 1439 | | |
1436 | 1440 | | |
1437 | 1441 | | |
| |||
0 commit comments