diff options
| author | 2022-04-21 22:10:49 +0800 | |
|---|---|---|
| committer | 2022-05-03 11:35:34 +0200 | |
| commit | 520a7e80c96d655fbe4650d9cc985bd9d0443389 (patch) | |
| tree | d237a4f8d47361104ba0ac50d9561a013dabfaea /include/linux/phy/git:/ssh:/git@git.zx2c4.com | |
| parent | x86/traps: Use pt_regs directly in fixup_bad_iret() (diff) | |
| download | linux-dev-520a7e80c96d655fbe4650d9cc985bd9d0443389.tar.xz linux-dev-520a7e80c96d655fbe4650d9cc985bd9d0443389.zip | |
x86/entry: Switch the stack after error_entry() returns
error_entry() calls fixup_bad_iret() before sync_regs() if it is a fault
from a bad IRET, to copy pt_regs to the kernel stack. It switches to the
kernel stack directly after sync_regs().
But error_entry() itself is also a function call, so it has to stash
the address it is going to return to, in %r12 which is unnecessarily
complicated.
Move the stack switching after error_entry() and get rid of the need to
handle the return address.
[ bp: Massage commit message. ]
Signed-off-by: Lai Jiangshan <jiangshan.ljs@antgroup.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220503032107.680190-3-jiangshanlai@gmail.com
Diffstat (limited to 'include/linux/phy/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
