[lkml]   [2018]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 5/8] x86/speculation: Add basic support for IBPB
On Sun, 2018-01-21 at 19:06 +0100, Borislav Petkov wrote:
> > switch to using ALTERNATIVES instead of static_cpu_has]
> Why?
>         if (static_cpu_has(X86_FEATURE_IBPB))
>                 wrmsr(MSR_IA32_PRED_CMD, PRED_CMD_IBPB, 0);
> It can't get any more readable than this. Why even f*ck with
> alternatives?

Because we're backporting this to every stable kernel under the sun,
and they don't already require asm-goto. Peter does have a dozen or so
objtool patches to protect us against the missed GCC optimisation which
would make it vulnerable via a conditional branch, but we'll do that
*after* the basic backportable implementation using ALTERNATIVE goes
in.[unhandled content-type:application/x-pkcs7-signature]
 \ /
  Last update: 2018-01-21 19:55    [W:0.079 / U:3.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site