From 0461df7ceeda2cee145d8bb6b1b2411ea799ad1b Mon Sep 17 00:00:00 2001 From: ClF3 Date: Tue, 5 Nov 2024 10:41:10 +0800 Subject: [PATCH] part2 ver 0.8.1 --- Part2-FlushReload/attacker.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) {