lkml.org 
[lkml]   [2018]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectImprove retpoline for Skylake
Date
[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://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc.git spec/skl-rsb-3

Against current tip/x86/pti

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

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