Messages in this thread | | | Date | Fri, 13 May 2022 15:34:12 +0200 | From | Joerg Roedel <> | Subject | Re: [PATCH V2] x86/sev: Mark the code returning to user space as syscall gap |
| |
Hi,
On Tue, Apr 12, 2022 at 08:49:08PM +0800, Lai Jiangshan wrote: > From: Lai Jiangshan <jiangshan.ljs@antgroup.com> > > When returning to user space, the %rsp is user controlled value. > > If it is SNP-guest and the hypervisor decides to mess with the code-page > for this path while a CPU is executing it. This will cause a #VC on > that CPU and that could hit in the syscall return path and mislead > the #VC handler. > > So make ip_within_syscall_gap() return true in this case.
With the SNP guest patches in tip-tree I think it actually becomes possible that a #VC exception hits in these parts of the execution stream. It requires good timing by the attacker, but it is not impossible. Therefore:
Acked-by: Joerg Roedel <jroedel@suse.de>
-- Jörg Rödel jroedel@suse.de
SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nürnberg Germany
(HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
| |