google / safeside

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

Changing some "generic memory" functions to take `void *` #116

Closed mmdriley closed 4 years ago

mmdriley commented 4 years ago

Taking char* made it easier to do pointer arithmetic in the function but required casts on some callers.

Since I was focusing on pointer arithmetic anyway, rewrote FlushFromCache to be a bit more precise and flush each cache line exactly once.