Re: x86/retpoline: Fill RSB on context switch for affected CPUs

From: Andi Kleen
Date: Fri Mar 09 2018 - 10:14:51 EST


> Shouldn't the RSB filling on context switch also be done on non-IBPB
> CPUs to protect (retpolined) user space tasks from other user space
> tasks?

The comment is actually incorrect. There's no risk to hit user space
addresses if we have KPTI and NX (which is fairly universal).

It's mainly needed on Skylake era CPUs.

Should fix the comment. I'll send a patch.

-Andi