diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-09-04 22:15:34 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-09-04 22:15:34 +0000 |
commit | 093195b40a5b74db25c085e14b3796a8eb82e4b2 (patch) | |
tree | b350d60b9b76d28c3d23631c3aafcbcba7c1ba5b /usr.bin/biff | |
parent | efc55658502b80cb0a38cd685c2b4c1fb92c199f (diff) |
To mitigate against spectre attacks, AMD processors without the
IBRS feature need an lfence instruction after every near ret. Place
them after all functions in the kernel which are implemented in
assembler. Change the retguard macro so that the end of the lfence
instruction is 16-byte aligned now. This prevents that the ret
instruction is at the end of a 32-byte boundary. The latter would
cause a performance impact on certain Intel processors which have
a microcode update to mitigate the jump conditional code erratum.
See software techniques for managing speculation on AMD processors
revision 9.17.20 mitigation G-5.
See Intel mitigations for jump conditional code erratum revision
1.0 november 2019 2.4 software guidance and optimization methods.
OK deraadt@ mortimer@
Diffstat (limited to 'usr.bin/biff')
0 files changed, 0 insertions, 0 deletions