google / safeside

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

Implement "measure read" function in pure assembly #95

Closed mmdriley closed 5 years ago

mmdriley commented 5 years ago

Some of my rationale is in demos/asm/README.md, but the highlights are:

This PR adds the assembly implementations with accompanying README, wires them up to be built, and rewrites callers to use them. There are also a couple of cleanup commits bundled in.

Some functions in instr.cc were left orphaned after this, so I removed them.

mmdriley commented 5 years ago

@asteinha this is ready for a look. Apologies for the large diff; here's one review strategy:

First, use "changes from" to review the cleanups separately. That's only ~15 lines but they might distract from the main review.

Then, in the main commit, a useful order might be:

If the review starts feeling like a slog, let me know and I can split it up into different PRs. For example, I can bring things in one architecture at a time, then put in one last PR to build it and swap out the implementation.

Thank you for the review!

mmdriley commented 5 years ago

Rebased on #98 so we can make sure tests pass.