[lkml]   [2018]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectImprove retpoline for Skylake
[This is an alternative to David's earlier patch to only
handle context switch. It handles more cases.]

Skylake needs some additional protections over plain RETPOLINE
for Spectre_v2.

The CPU can fall back to the potentially poisioned indirect branch
predictor when the return buffer underflows.

This patch kit extends RETPOLINE to guard against many (but not
all) of such cases by filling the return buffer.

- Context switch when switching from shallow to deeper call chain
- Idle which clears the return buffer
- Interrupts which cause deep call chains

This is done with a new SPECTRE_V2 defense mode and feature flag.

The mitigations are only enabled on Skylake, patched out
on other CPUs.

Git tree at

git:// spec/skl-rsb-3

Against current tip/x86/pti

v1: Initial post, but containing some patches posted earlier, but

 \ /
  Last update: 2018-01-14 23:26    [W:0.071 / U:23.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site