Re: Should SEV-ES #VC use IST? (Re: [PATCH] Allow RDTSC and RDTSCP from userspace)
From: Peter Zijlstra <peterz@infradead.org>
Date: 2020-06-23 16:02:43
Also in:
kvm, lkml
From: Peter Zijlstra <peterz@infradead.org>
Date: 2020-06-23 16:02:43
Also in:
kvm, lkml
On Tue, Jun 23, 2020 at 05:38:55PM +0200, Joerg Roedel wrote:
On Tue, Jun 23, 2020 at 05:23:26PM +0200, Peter Zijlstra wrote:
quoted
Reliability of that depends on the unwinder, I wouldn't want the guess uwinder to OOPS me by accident.It doesn't use the full unwinder, it just assumes that there is a pt_regs struct at the top of every kernel stack and walks through them until SP points to a user-space stack. As long as the assumption that there is a pt_regs struct on top of every stack holds, this should be safe. The assumption might be wrong when an exception happens during SYSCALL/SYSENTER entry, when the return frame is not written by hardware.
The IRQ and SoftIRQ stacks don't have that I think. Only the task and exception stacks.