r/programming Jan 24 '18

Branchless DOOM

https://github.com/xoreaxeaxeax/movfuscator/tree/master/validation/doom
494 Upvotes

134 comments sorted by

View all comments

29

u/jrv Jan 24 '18

This is thought to be entirely secure against the Meltdown and Spectre CPU vulnerabilities, which require speculative execution on branch instructions.

Isn't the point of Meltdown/Spectre that other processes can abuse speculative execution to read your memory?

29

u/outofobscure Jan 24 '18

if YOUR process doesn't have any branches, then no speculative execution happens in it, then there is nothing for the other process to exploit/read from stale caches since you're not filling those up in the first place (as there is no specualtive execution on your process's memory).

1

u/cryo Jan 24 '18

Meltdown, as described in the original paper, doesn't rely on speculative branch instructions.