2021-01-26 10:03:50 +01:00
|
|
|
use basic_timing_cache_channel::naive::NaiveTimingChannel;
|
|
|
|
use basic_timing_cache_channel::TimingChannelPrimitives;
|
2020-09-22 14:36:07 +02:00
|
|
|
|
2021-01-26 10:03:50 +01:00
|
|
|
use cache_utils::calibration::only_reload;
|
2020-11-20 10:52:58 +01:00
|
|
|
|
2021-01-26 10:03:50 +01:00
|
|
|
#[derive(Debug)]
|
|
|
|
pub struct NaiveFRPrimitives {}
|
2020-11-20 10:52:58 +01:00
|
|
|
|
2021-01-26 10:03:50 +01:00
|
|
|
impl TimingChannelPrimitives for NaiveFRPrimitives {
|
|
|
|
unsafe fn attack(&self, addr: *const u8) -> u64 {
|
|
|
|
unsafe { only_reload(addr) }
|
2020-11-20 10:52:58 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-26 10:03:50 +01:00
|
|
|
pub type NaiveFlushAndReload = NaiveTimingChannel<NaiveFRPrimitives>;
|