diff options
author | Andy Lutomirski <luto@kernel.org> | 2019-11-20 10:10:49 +0100 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2019-11-21 19:37:44 +0100 |
commit | a1a338e5b6fe9e0a39c57c232dc96c198bb53e47 (patch) | |
tree | 1895708bea9167003a38d7eb4a4431b4dc5edb00 /tools/testing | |
parent | x86/entry/32: Move FIXUP_FRAME after pushing %fs in SAVE_ALL (diff) | |
download | linux-a1a338e5b6fe9e0a39c57c232dc96c198bb53e47.tar.xz linux-a1a338e5b6fe9e0a39c57c232dc96c198bb53e47.zip |
x86/entry/32: Unwind the ESPFIX stack earlier on exception entry
Right now, we do some fancy parts of the exception entry path while SS
might have a nonzero base: we fill in regs->ss and regs->sp, and we
consider switching to the kernel stack. This results in regs->ss and
regs->sp referring to a non-flat stack and it may result in
overflowing the entry stack. The former issue means that we can try to
call iret_exc on a non-flat stack, which doesn't work.
Tested with selftests/x86/sigreturn_32.
Fixes: 45d7b255747c ("x86/entry/32: Enter the kernel via trampoline stack")
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@kernel.org
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions