Body:

No Text

anon (anon.anon.delete@this.noname.noname.org) on April 27, 2018 11:39 pm wrote: > The CentOS linux kernels treat those old AMD processors differently for the spectre2 mitigation. > > As seen in their documentation: > > Some CPUs can only disable IBP but have no IBRS/IBPB support in which case > these lines are printed and a special use_ibp_disable mode is > used. > > FEATURE SPEC_CTRL Present (Implicit) > FEATURE IBPB_SUPPORT Present (Implicit) > > and > > retp_enabled 1: > Retpolines are enabled in the kernel, which replace all > indirect jumps and indirect calls with a special instruction sequence which avoids the use of IBP. > > This is the default mode on all CPUs except for Intel Skylake+ and AMD 10h/12h. > > and > > ibrs_enabled 2: > This is the default mode on AMD 10h and AMD 12h > families, which have the ability to completely disable > the indirect branch predictor. They don't actually have > IBRS or IBPB, but the effect is the same. > > > And indeed from the official AMD 10h kernel developer guide: > > MSRC001_1021 Instruction Cache Configuration Register (IC_CFG) > [14] DIS_IND. Read-write. 1=Disable indirect branch predictor. > > Which is what CentOS/RH enables. > > Currently, standard linux kernel and windows for some reason doesn't use > this. Windows doesn't seem mitigate spectre2 at all on these processors. > > I did some fast bench tests with this on my old 10h machine and performance difference was minimal (0-3%). > > This seems to be a native architecture chicken-bit and not > a microcode workaround with heavy performance penalty. > > Is this what "future" x86 processors will implement in their arch to mitigate spectre2?