Re: [PATCH v5 22/34] x86/fred: FRED initialization code

From: Dave Hansen
Date: Wed Mar 22 2023 - 12:30:14 EST


On 3/20/23 18:02, andrew.cooper3@xxxxxxxxxx wrote:
> There are fewer cases where a non-IST #VE ends up in a re-entrant fault
> (IIRC, you can still manage it by unmapping the entry stack), but you're
> still trusting the outer hypervisor to not e.g. unmap the SYSCALL entry
> point.

This is a general weakness of #VE. But, the current Linux TDX guest
implementation is not vulnerable to it. If the host unmaps something
unexpectedly, the guest will just die because of ATTR_SEPT_VE_DISABLE.
No #VE:

> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/coco/tdx/tdx.c#n216