diff --git a/basic_timing_cache_channel/src/lib.rs b/basic_timing_cache_channel/src/lib.rs index 462e05a..afb856b 100644 --- a/basic_timing_cache_channel/src/lib.rs +++ b/basic_timing_cache_channel/src/lib.rs @@ -44,7 +44,7 @@ pub trait TimingChannelPrimitives: Debug + Send + Sync + Default { #[derive(Debug)] pub struct TopologyAwareTimingChannelHandle { threshold: Threshold, - vpn: VPN, + vpn: VPN, // what is this field used for addr: *const u8, ready: bool, calibration_epoch: usize, @@ -488,6 +488,8 @@ impl MultipleAddrCacheSideChannel for TopologyAwareT operation(); // TODO use a different helper core ? } + // this function tolerates multiple handle on the same cache line + // should the invariant be fixed to one handle per line & calibration epoch ? unsafe fn calibrate( &mut self, addresses: impl IntoIterator + Clone, diff --git a/basic_timing_cache_channel/src/naive.rs b/basic_timing_cache_channel/src/naive.rs index 7e87864..dcb98ed 100644 --- a/basic_timing_cache_channel/src/naive.rs +++ b/basic_timing_cache_channel/src/naive.rs @@ -22,7 +22,7 @@ pub struct NaiveTimingChannel { } pub struct NaiveTimingChannelHandle { - vpn: VPN, + vpn: VPN, // what is this field used for addr: *const u8, } @@ -83,6 +83,10 @@ impl NaiveTimingChannel { } } + // The former invariant of one handle per page has been removed + // Now tolerates as many handles per cache line as wanted + // should the invariant be fixed into one handle per cache line ? + unsafe fn calibrate_impl( &mut self, addr: *const u8,