diff --git a/Part2-FlushReload/attacker.c b/Part2-FlushReload/attacker.c index 2250846..dda9364 100644 --- a/Part2-FlushReload/attacker.c +++ b/Part2-FlushReload/attacker.c @@ -26,9 +26,7 @@ int main() { // [2.1] TODO: Put your capture-the-flag code here for (int j = 0; j < 1024; j++) { - for(int i = 0; i < 1024; i++) { - clflush((ADDR_PTR)buf + i * 128); - } + clflush((ADDR_PTR)buf + j * 128); for(int i = 0; i < WAIT_TIME; i++); time = measure_one_block_access_time((ADDR_PTR)buf + j * 128); if(time < CACHE_HIT_THRESHOLD) {