]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
x86/sev: Fix stack type check in vc_switch_off_ist()
authorJoerg Roedel <jroedel@suse.de>
Thu, 21 Oct 2021 08:08:32 +0000 (10:08 +0200)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:33:06 +0000 (07:33 +0100)
commit153f7542527ced837e55df19119bacb8e2e05ab3
tree9f6b01bf0274a5c74360eef7b3b810447f489bce
parent6a2b71582d79bc2ecaef29cf9b82e5c63b3f38ba
x86/sev: Fix stack type check in vc_switch_off_ist()

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 5681981fb788281b09a4ea14d310d30b2bd89132 ]

The value of STACK_TYPE_EXCEPTION_LAST points to the last _valid_
exception stack. Reflect that in the check done in the
vc_switch_off_ist() function.

Fixes: a13644f3a53de ("x86/entry/64: Add entry code for #VC handler")
Reported-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211021080833.30875-2-joro@8bytes.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/x86/kernel/traps.c