Fix bug in unsupported hashing that resulted in a ridiculous number of iteration

This commit is contained in:
Guillaume Didier 2021-09-29 11:24:23 +02:00
parent e3ef141792
commit c43daf8499
2 changed files with 1 additions and 2 deletions

View File

@ -201,7 +201,6 @@ fn calibrate_fixed_freq_2_thread_impl<I: Iterator<Item = (usize, usize)>, T>(
let mut calibrate_result_vec = Vec::new(); let mut calibrate_result_vec = Vec::new();
let offsets = image_antecedent.values().copied(); let offsets = image_antecedent.values().copied();
eprintln!("Number of offsets: {}", offsets.len());
/* /*
let offsets: Box<dyn Iterator<Item = isize>> = match image_antecedent { let offsets: Box<dyn Iterator<Item = isize>> = match image_antecedent {

View File

@ -288,7 +288,7 @@ pub enum CacheAttackSlicing {
impl CacheAttackSlicing { impl CacheAttackSlicing {
pub fn from(cs: CacheSlicing, cache_line_length: usize) -> CacheAttackSlicing { pub fn from(cs: CacheSlicing, cache_line_length: usize) -> CacheAttackSlicing {
match cs { match cs {
Unsupported => CacheAttackSlicing::Unsupported(!((1 << cache_line_length) - 1)), Unsupported => CacheAttackSlicing::Unsupported(!dbg!(dbg!(cache_line_length) - 1)),
ComplexAddressing(ca) => CacheAttackSlicing::ComplexAddressing(ca), ComplexAddressing(ca) => CacheAttackSlicing::ComplexAddressing(ca),
SimpleAddressing(sa) => CacheAttackSlicing::SimpleAddressing(sa), SimpleAddressing(sa) => CacheAttackSlicing::SimpleAddressing(sa),
NoSlice => CacheAttackSlicing::NoSlice, NoSlice => CacheAttackSlicing::NoSlice,