diff options
author | Iru Cai <mytbk920423@gmail.com> | 2019-04-16 22:31:31 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2019-04-16 22:31:31 +0800 |
commit | 5c5b6f718e0662e9226bcc55b96270082dffe91b (patch) | |
tree | 3de3f6f22d0928f7d748d16c27fb23aacdbe8d43 /attack_code/victim_v10/victim_v10.c | |
parent | 784dfab4de621562b4032e79c0d2085edda7e203 (diff) | |
download | gem5-5c5b6f718e0662e9226bcc55b96270082dffe91b.tar.xz |
victim function v10
Diffstat (limited to 'attack_code/victim_v10/victim_v10.c')
-rw-r--r-- | attack_code/victim_v10/victim_v10.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/attack_code/victim_v10/victim_v10.c b/attack_code/victim_v10/victim_v10.c new file mode 100644 index 000000000..193ac750d --- /dev/null +++ b/attack_code/victim_v10/victim_v10.c @@ -0,0 +1,17 @@ +/* code from https://www.paulkocher.com/doc/MicrosoftCompilerSpectreMitigation.html */ + +#include <stdlib.h> +#include <stdint.h> + +extern size_t array_size; +extern uint8_t array1[]; +extern uint8_t array2[]; +extern uint8_t temp; + +void victim_function_v10(size_t x, uint8_t k) +{ + if (x < array_size) { + if (array1[x] == k) + temp &= array2[0]; + } +} |