[Bug target/102952] New code-gen options for retpolines and straight line speculation
andrew.cooper3 at citrix dot com
gcc-bugzilla@gcc.gnu.org
Tue Oct 26 17:11:46 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102952
--- Comment #2 from Andrew Cooper <andrew.cooper3 at citrix dot com> ---
PeterZ has suggested that the straight line speculation case can be
dis-entangled with the thunk inlining case.
If an `int3` is emitted following any `jmp __x86_indirect_thunk_*` instruction
(i.e. treated as an indirect jump despite retpoline), then the inlining logic
need not worry about straight line speculation at all.
However, this does depend on not generating `jcc __x86_indirect_thunk_*` as
inlining that would require an additional `int3` for SLS safety.
More information about the Gcc-bugs
mailing list