Re: [PATCH v2.1] x86/retpoline: Fill return stack buffer on vmexit

From: Peter Zijlstra
Date: Thu Jan 11 2018 - 07:26:26 EST


On Thu, Jan 11, 2018 at 11:37:18AM +0000, David Woodhouse wrote:
> In accordance with the Intel and AMD documentation, we need to overwrite
> all entries in the RSB on exiting a guest, to prevent malicious branch
> target predictions from affecting the host kernel. This is needed both
> for retpoline and for IBRS.
>
> Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>

Tested this on my AMD Interlagos, seems to work.

Tested-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>