diff options
author | 2021-03-03 15:17:13 +0100 | |
---|---|---|
committer | 2021-03-09 12:26:26 +0100 | |
commit | 545ac14c16b5dbd909d5a90ddf5b5a629a40fa94 (patch) | |
tree | 180b58a5e4ddb5386be43f5fd8d473d9c5955e9d /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | x86/sev-es: Introduce ip_within_syscall_gap() helper (diff) | |
download | wireguard-linux-545ac14c16b5dbd909d5a90ddf5b5a629a40fa94.tar.xz wireguard-linux-545ac14c16b5dbd909d5a90ddf5b5a629a40fa94.zip |
x86/sev-es: Check regs->sp is trusted before adjusting #VC IST stack
The code in the NMI handler to adjust the #VC handler IST stack is
needed in case an NMI hits when the #VC handler is still using its IST
stack.
But the check for this condition also needs to look if the regs->sp
value is trusted, meaning it was not set by user-space. Extend the check
to not use regs->sp when the NMI interrupted user-space code or the
SYSCALL gap.
Fixes: 315562c9af3d5 ("x86/sev-es: Adjust #VC IST Stack on entering NMI handler")
Reported-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: stable@vger.kernel.org # 5.10+
Link: https://lkml.kernel.org/r/20210303141716.29223-3-joro@8bytes.org
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions