From 78ab59ea449c8af188ecbd0d6961f35e3dd7ecb6 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 16 Feb 2019 20:52:53 +0000 Subject: [PATCH] crypto: clear cache after generating random program --- src/crypto/CryptonightR_JIT.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/crypto/CryptonightR_JIT.c b/src/crypto/CryptonightR_JIT.c index 0b123b4ee..9add65296 100644 --- a/src/crypto/CryptonightR_JIT.c +++ b/src/crypto/CryptonightR_JIT.c @@ -95,5 +95,8 @@ int v4_generate_JIT_code(const struct V4_Instruction* code, v4_random_math_JIT_f } APPEND_CODE(epilogue, sizeof(epilogue)); + + __builtin___clear_cache((char*)buf, (char*)JIT_code); + return 0; }