google / safeside

Understand and mitigate software-observable side-channels
BSD 3-Clause "New" or "Revised" License
493 stars 53 forks source link

Replace moving RIP with a solution always preserving correctness #74

Open asteinha opened 4 years ago

asteinha commented 4 years ago

In Meltdown examples we currently move the instruction pointer in a signal handler. If there were some register spills, the correctness of the C++ execution model can be violated. We should look for a solution that maintains current functionality of our Meltdown examples while always preserving correctness.

mmdriley commented 4 years ago

Not to pile too many hopes on this issue, but as we consider moving to a new mechanism and interface for fault-recovery it could be nice to keep an eye on supporting fault suppression using TSX as well, maybe through one of two swappable implementations.

asteinha commented 4 years ago

Not to pile too many hopes on this issue, but as we consider moving to a new mechanism and interface for fault-recovery it could be nice to keep an eye on supporting fault suppression using TSX as well, maybe through one of two swappable implementations.

That's true, however I don't see it as a priority, because it is not a portable solution - does not work on AMD and on older Intel CPUs - and it is not neccessary in any of our current examples. I'll just check the Meltdown-OF whether it would not work better with Intel TSX on the newest Intel CPUs. That one performs much better on AMD.