This is an archive of the discontinued LLVM Phabricator instance.

Enable automatic mitigation against control flow speculation.
Needs ReviewPublic

Authored by kristof.beyls on Jul 9 2018, 4:46 AM.

Details

Reviewers
javed.absar
Summary

This is part of implementing a technique to mitigate against Spectre v1,
similar in spirit to what has been proposed by Chandler for X86_64 at
http://lists.llvm.org/pipermail/llvm-dev/2018-March/122085.html.

This patch implements a specific policy for automatically mitigating
against Spectre v1 attacks. The policy implemented in this patch
protects all integer data that is loaded from being used in
miss-speculaled path executions. Presumably, a number of different
policies could be better in different situations (e.g. not
automatically protecting data loaded from the stack). Therefore, I see
this patch as one example of a policy to automatically mitigate
against Spectre v1.

Diff Detail