Re: [PATCH v3] x86/bugs: Default retbleed to =stuff when retpoline is enabled

From: Pawan Gupta
Date: Wed Apr 03 2024 - 10:51:22 EST


On Wed, Apr 03, 2024 at 05:32:40PM +0300, Nikolay Borisov wrote:
>
>
> On 3.04.24 г. 8:54 ч., Pawan Gupta wrote:
> > On Intel systems when retpoline mitigation is enabled for spectre-v2,
> > retbleed=auto does not enable RSB stuffing. This may make the system
> > vulnerable to retbleed. Retpoline is not the default mitigation when
> > IBRS is present, but in virtualized cases a VMM can hide IBRS from
> > guests, resulting in guest deploying retpoline by default. Even if IBRS
> > is enumerated, a user can still select spectre_v2=retpoline.
> >
> > As with other mitigations, mitigate retbleed by default. On Intel
> > systems when retpoline is enabled, and retbleed mitigation is set to
> > auto, enable Call Depth Tracking and RSB stuffing i.e. retbleed=stuff
> > mitigation. For AMD/Hygon auto mode already selects the appropriate
> > mitigation.
> >
> > Reported-by: Alyssa Milburn <alyssa.milburn@xxxxxxxxx>
> > Cc: stable@xxxxxxxxxx
> > Signed-off-by: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx>
>
> Reviewed-by: Nikolay Borisov <nik.borisov@xxxxxxxx>

Thanks.