Add lfence after ret in retpoline thunk.
authormortimer <mortimer@openbsd.org>
Wed, 1 Sep 2021 13:37:14 +0000 (13:37 +0000)
committermortimer <mortimer@openbsd.org>
Wed, 1 Sep 2021 13:37:14 +0000 (13:37 +0000)
commitd23869897606b8e31c73d9c35bc87b8dc53e8483
tree0497803746a8de93ac959eea855f3f63b2014ecf
parent5486fdbb77a4921c407e511dcd6c5fbd8cf5caa3
Add lfence after ret in retpoline thunk.

Recommended by AMD white paper Software Techniques for Managing
Speculation on AMD Processors (9.17.20) mitigation V2-1.

Pointed out by bluhm@. ok bluhm@ kettenis@
gnu/llvm/llvm/lib/Target/X86/X86IndirectThunks.cpp