From 73dfe68cdf67d628dac2cd1af119881cc6e6a327 Mon Sep 17 00:00:00 2001 From: ClF3 Date: Mon, 4 Nov 2024 20:06:23 +0800 Subject: [PATCH] part2 ver 0.2.2 --- Part2-FlushReload/attacker.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } }