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.
smime.p7s
Description: S/MIME cryptographic signature