ring icon indicating copy to clipboard operation
ring copied to clipboard

Support mitigations that are normally done automatically by compilers in assembly

Open briansmith opened this issue 10 months ago • 1 comments

Rust is adding a -Zharden-sls mitigation for straight-line speculation; see https://github.com/rust-lang/rust/pull/136597.

This raises the question of what to about our external assembly code. Should we expect the assembler to inject these mitigations? If so, which versions of which assemblers will?

Should we modify (ideally upstream) the (Perl)asm source to insert these mitigations? If so, we should coordinate with them.

briansmith avatar Mar 12 '25 20:03 briansmith

Background material:

  • https://patchwork.kernel.org/project/xen-devel/patch/[email protected]/#23683471
  • https://www.phoronix.com/news/Arm-Straight-Line-Speculation
  • https://lore.kernel.org/lkml/[email protected]/T/#m891396b53735e58e87265343c7db46f0501057db
  • https://www.phoronix.com/news/x86-SLS-Mitigation-5.17

Most of the info about SLS is regarding the initial AArch64 issue but there is also x86-64, at least.

briansmith avatar Mar 12 '25 20:03 briansmith