From 05125eb67c9da98e349dabea50f81f24080f6347 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Fri, 18 Jun 2021 23:48:39 +0200 Subject: [PATCH] LM: Workaround JiT compiler bug in -m 3000 on NV leading to false negatives with large amount of hashes --- OpenCL/m01500_a3-pure.cl | 12 +++--------- OpenCL/m03000_a3-pure.cl | 10 ++-------- docs/changes.txt | 1 + 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/OpenCL/m01500_a3-pure.cl b/OpenCL/m01500_a3-pure.cl index d4312dbbb..f7a8ad45c 100644 --- a/OpenCL/m01500_a3-pure.cl +++ b/OpenCL/m01500_a3-pure.cl @@ -2229,9 +2229,7 @@ KERNEL_FQ void m01500_mxx (KERN_ATTR_BITSLICE ()) u32 tmpResult = 0; - #ifdef _unroll #pragma unroll - #endif for (int i = 0; i < 32; i++) { const u32 b0 = -((search[0] >> i) & 1); @@ -2247,12 +2245,12 @@ KERNEL_FQ void m01500_mxx (KERN_ATTR_BITSLICE ()) const u32 r0 = search[0]; const u32 r1 = search[1]; + #ifdef KERNEL_STATIC const u32 r2 = 0; const u32 r3 = 0; + #endif - #ifdef KERNEL_STATIC #include COMPARE_M - #endif } } else @@ -2260,9 +2258,7 @@ KERNEL_FQ void m01500_mxx (KERN_ATTR_BITSLICE ()) u32 out0[32]; u32 out1[32]; - #ifdef _unroll #pragma unroll - #endif for (int i = 0; i < 32; i++) { out0[i] = out[ 0 + 31 - i]; @@ -2272,15 +2268,13 @@ KERNEL_FQ void m01500_mxx (KERN_ATTR_BITSLICE ()) transpose32c (out0); transpose32c (out1); - #ifdef _unroll #pragma unroll - #endif for (int slice = 0; slice < 32; slice++) { const u32 r0 = out0[31 - slice]; const u32 r1 = out1[31 - slice]; - const u32 r2 = 0; #ifdef KERNEL_STATIC + const u32 r2 = 0; const u32 r3 = 0; #endif diff --git a/OpenCL/m03000_a3-pure.cl b/OpenCL/m03000_a3-pure.cl index da58c34df..a44b6f065 100644 --- a/OpenCL/m03000_a3-pure.cl +++ b/OpenCL/m03000_a3-pure.cl @@ -2070,9 +2070,7 @@ KERNEL_FQ void m03000_mxx (KERN_ATTR_BITSLICE ()) u32 tmpResult = 0; - #ifdef _unroll #pragma unroll - #endif for (int i = 0; i < 32; i++) { const u32 b0 = -((search[0] >> i) & 1); @@ -2088,8 +2086,8 @@ KERNEL_FQ void m03000_mxx (KERN_ATTR_BITSLICE ()) const u32 r0 = search[0]; const u32 r1 = search[1]; - const u32 r2 = 0; #ifdef KERNEL_STATIC + const u32 r2 = 0; const u32 r3 = 0; #endif @@ -2101,9 +2099,7 @@ KERNEL_FQ void m03000_mxx (KERN_ATTR_BITSLICE ()) u32 out0[32]; u32 out1[32]; - #ifdef _unroll #pragma unroll - #endif for (int i = 0; i < 32; i++) { out0[i] = out[ 0 + 31 - i]; @@ -2113,15 +2109,13 @@ KERNEL_FQ void m03000_mxx (KERN_ATTR_BITSLICE ()) transpose32c (out0); transpose32c (out1); - #ifdef _unroll #pragma unroll - #endif for (int slice = 0; slice < 32; slice++) { const u32 r0 = out0[31 - slice]; const u32 r1 = out1[31 - slice]; - const u32 r2 = 0; #ifdef KERNEL_STATIC + const u32 r2 = 0; const u32 r3 = 0; #endif diff --git a/docs/changes.txt b/docs/changes.txt index 0b524ef66..c99027da2 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -20,6 +20,7 @@ ## Technical ## +- LM: Workaround JiT compiler bug in -m 3000 on NV leading to false negatives with large amount of hashes - Tests: Changed tests for VeraCrypt from -a 0 to -a 3, because password extension is not available to all shells * changes v6.2.1 -> v6.2.2