linux/arch/x86/kernel/cpu
Peter Zijlstra 3ebc170068 x86/bugs: Add retbleed=ibpb
jmp2ret mitigates the easy-to-attack case at relatively low overhead.
It mitigates the long speculation windows after a mispredicted RET, but
it does not mitigate the short speculation window from arbitrary
instruction boundaries.

On Zen2, there is a chicken bit which needs setting, which mitigates
"arbitrary instruction boundaries" down to just "basic block boundaries".

But there is no fix for the short speculation window on basic block
boundaries, other than to flush the entire BTB to evict all attacker
predictions.

On the spectrum of "fast & blurry" -> "safe", there is (on top of STIBP
or no-SMT):

  1) Nothing		System wide open
  2) jmp2ret		May stop a script kiddy
  3) jmp2ret+chickenbit  Raises the bar rather further
  4) IBPB		Only thing which can count as "safe".

Tentative numbers put IBPB-on-entry at a 2.5x hit on Zen2, and a 10x hit
on Zen1 according to lmbench.

  [ bp: Fixup feature bit comments, document option, 32-bit build fix. ]

Suggested-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
2022-06-27 10:34:00 +02:00
..
mce libnvdimm for 5.19 2022-05-27 15:49:30 -07:00
microcode x86/microcode: Remove unnecessary perf callback 2022-05-31 09:31:19 +02:00
mtrr x86/mtrr: Replace deprecated CPU-hotplug functions. 2021-08-10 14:46:27 +02:00
resctrl x86: Replace cpumask_weight() with cpumask_empty() where appropriate 2022-04-10 22:35:38 +02:00
sgx x86/sgx: Set active memcg prior to shmem allocation 2022-06-02 10:58:47 -07:00
.gitignore
acrn.c
amd.c x86/cpu: Clear SME feature flag when not in use 2022-02-16 19:45:53 +01:00
aperfmperf.c x86/aperfmperf: Integrate the fallback code from show_cpuinfo() 2022-04-27 20:22:20 +02:00
bugs.c x86/bugs: Add retbleed=ibpb 2022-06-27 10:34:00 +02:00
cacheinfo.c sched: Add cluster scheduler level for x86 2021-10-15 11:25:16 +02:00
centaur.c
common.c x86/bugs: Report Intel retbleed vulnerability 2022-06-27 10:33:59 +02:00
cpu.h x86/tsx: Disable TSX development mode at boot 2022-04-11 09:58:40 +02:00
cpuid-deps.c x86/fpu: Optimize out sigframe xfeatures when in init state 2021-11-03 22:42:35 +01:00
cyrix.c x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
feat_ctl.c x86/cpu/intel: Allow SGX virtualization without Launch Control support 2021-04-06 09:43:41 +02:00
hygon.c x86/cpu: Fix migration safety with X86_BUG_NULL_SEL 2021-10-21 20:49:16 +02:00
hypervisor.c
intel.c platform-drivers-x86 for v5.19-1 2022-05-23 20:38:39 -07:00
intel_epb.c x86: intel_epb: Allow model specific normal EPB value 2022-01-04 16:37:23 +01:00
intel_pconfig.c
Makefile x86/CPU: Add support for Vortex CPUs 2021-10-21 15:49:07 +02:00
match.c
mkcapflags.sh
mshyperv.c hyperv-next for 5.19 2022-05-28 11:39:01 -07:00
perfctr-watchdog.c x86/nmi_watchdog: Fix old-style NMI watchdog regression on old Intel CPUs 2021-06-10 10:04:40 +02:00
powerflags.c
proc.c x86/aperfmperf: Integrate the fallback code from show_cpuinfo() 2022-04-27 20:22:20 +02:00
rdrand.c
scattered.c x86/cpufeatures: Add PerfMonV2 feature bit 2022-05-04 11:17:15 +02:00
topology.c x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
transmeta.c
tsx.c x86/tsx: Disable TSX development mode at boot 2022-04-11 09:58:40 +02:00
umc.c
umwait.c
vmware.c Have vmware guests skip the refined TSC calibration when the TSC 2021-04-26 09:13:43 -07:00
vortex.c x86/CPU: Add support for Vortex CPUs 2021-10-21 15:49:07 +02:00
zhaoxin.c