[PATCH] D41723: Introduce the "retpoline" x86 mitigation technique for variant #2 of the speculative execution vulnerabilities disclosed today, specifically identified by CVE-2017-5715, "Branch Target Injection", and is one of the two halves to Spectre..

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 19:21:17 PST 2018


probinson added a comment.

In https://reviews.llvm.org/D41723#968977, @chandlerc wrote:

> In https://reviews.llvm.org/D41723#968248, @ddibyend wrote:
>
> > For AMD processors we may be able to handle indirect jumps via a simpler lfence mechanism. Indirect calls may still require retpoline. If this turns out to be the right solution for AMD processors we may need to put some code in to support this.
>
>
> Yeah, if it ends up that we want non-retpoline mitigations for AMD we can and should add them. One hope I have is that this patch is at least generically *sufficient* (when paired with correct RSB filling) even if it suboptimal in some cases and we end up adding more precise tools later.


Just to say that at Sony we're still doing our investigation and might be interested in lfence.  But who knows, we might just zap the predictor on syscalls and context switches; for environments that have mostly a few long-running processes with comparatively few syscalls it might be net cheaper than making every indirection more expensive.


https://reviews.llvm.org/D41723





More information about the llvm-commits mailing list