Document issues around number of handles per page / cache line

The two channel used to have different invariants. Currently the enforcement of any limitation of handle per page or handle per cache line has been removed, hence document this issue in the code.
This commit is contained in:
Guillume DIDIER 2021-07-19 09:17:09 +02:00
parent 4cbacf96a9
commit 78c4018a04
2 changed files with 8 additions and 2 deletions

View File

@ -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<T: TimingChannelPrimitives> 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<Item = *const u8> + Clone,

View File

@ -22,7 +22,7 @@ pub struct NaiveTimingChannel<T: TimingChannelPrimitives> {
}
pub struct NaiveTimingChannelHandle {
vpn: VPN,
vpn: VPN, // what is this field used for
addr: *const u8,
}
@ -83,6 +83,10 @@ impl<T: TimingChannelPrimitives> NaiveTimingChannel<T> {
}
}
// 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,