Lai Jiangshan 520a7e80c9 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
2022-05-03 11:35:34 +02:00
..
2022-03-26 12:19:04 -07:00
2022-01-16 15:53:00 +02:00
2021-11-01 21:17:39 -07:00
2022-04-07 11:27:02 +02:00
2022-04-19 21:58:47 +02:00
2021-12-11 09:09:45 +01:00