diff --git a/BCB/Paul Kocher/Example 1/ex01_optimal.c b/BCB/Paul Kocher/Example 1/ex01_optimal.c index 73748889e46a5deb3ec03036de6165877cddeed5..0719a27e5914e34453ba5b2970353b715ef7e59d 100644 --- a/BCB/Paul Kocher/Example 1/ex01_optimal.c +++ b/BCB/Paul Kocher/Example 1/ex01_optimal.c @@ -2,9 +2,9 @@ __declspec(dllexport) void optimal_solution_v01(size_t x) { - if (x < array1_size) { - uint8_t v = array1[x] * 512; - _mm_lfence(); - temp &= array2[v]; - } + if (x < array1_size) { + uint8_t v = array1[x] * 512; + _mm_lfence(); + temp &= array2[v]; + } } diff --git a/BCB/Paul Kocher/Example 13/ex13.c b/BCB/Paul Kocher/Example 13/ex13.c index 09b92709d3bba488f478d86187faa42b1da079f0..c4973bcd0f8fff87adc8a91947b6aa4bb9245343 100644 --- a/BCB/Paul Kocher/Example 13/ex13.c +++ b/BCB/Paul Kocher/Example 13/ex13.c @@ -1,6 +1,6 @@ #include "../ex_main.h" -__inline int is_x_safe(size_t x) { if (x < array1_size) return 1; return 0; } +__forceinline int is_x_safe(size_t x) { if (x < array1_size) return 1; return 0; } __declspec(dllexport) void victim_function_v13(size_t x) { diff --git a/BCB/Paul Kocher/Example 2/ex02.c b/BCB/Paul Kocher/Example 2/ex02.c index e74e750a97308d081799d60dc7065eeffcbb56da..ee29426b3810056c89c0eac1d718728b580d8c27 100644 --- a/BCB/Paul Kocher/Example 2/ex02.c +++ b/BCB/Paul Kocher/Example 2/ex02.c @@ -1,6 +1,6 @@ #include "../ex_main.h" -void leakByteLocalFunction_v02(uint8_t k) { +__forceinline void leakByteLocalFunction_v02(uint8_t k) { temp &= array2[(k)* 512]; } diff --git a/BCB/Paul Kocher/Example 7/ex07.c b/BCB/Paul Kocher/Example 7/ex07.c index fc83413b5f833b8203d24a36184acf2cebd20115..6662f504ee16e1d2878f417d55da7d481e7313e6 100644 --- a/BCB/Paul Kocher/Example 7/ex07.c +++ b/BCB/Paul Kocher/Example 7/ex07.c @@ -1,7 +1,7 @@ #include "../ex_main.h" __declspec(dllexport) -void optimal_sol_v07(size_t x) { +void victim_function_v07(size_t x) { static size_t last_x = 0; if (x == last_x) temp &= array2[array1[x] * 512]; diff --git a/BCB/Paul Kocher/Example 7/msvc/ex07.bir b/BCB/Paul Kocher/Example 7/msvc/ex07.bir index b470857bf61229768d09cf66cefa0faa12db6e99..d96e0ccb0a0f990d62e97da9c84aeffb3d2fcc37 100644 Binary files a/BCB/Paul Kocher/Example 7/msvc/ex07.bir and b/BCB/Paul Kocher/Example 7/msvc/ex07.bir differ