diff --git a/include/opencl.h b/include/opencl.h index 7b1a00dba..86f6839c0 100644 --- a/include/opencl.h +++ b/include/opencl.h @@ -73,7 +73,7 @@ void writeProgramBin (char *dst, u8 *binary, size_t binary_size); int gidd_to_pw_t (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw); -int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration); +int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration); int run_kernel (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num, const uint event_update, const uint iteration, hashconfig_t *hashconfig); int run_kernel_mp (const uint kern_run, opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const uint num); int run_kernel_tm (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param); diff --git a/include/types.h b/include/types.h index 3e84373dc..c01f7997d 100644 --- a/include/types.h +++ b/include/types.h @@ -971,7 +971,6 @@ typedef struct u32 attack_kern; u32 quiet; u32 force; - u32 benchmark; u32 runtime; u32 hex_charset; u32 hex_salt; diff --git a/src/dispatch.c b/src/dispatch.c index c02e881a3..aa5e0972c 100644 --- a/src/dispatch.c +++ b/src/dispatch.c @@ -282,7 +282,7 @@ void *thread_calc (void *p) if (opencl_ctx->run_thread_level1 == false) break; - if (data.benchmark == true) break; + if (user_options->benchmark == true) break; device_param->words_done = words_fin; } diff --git a/src/hashcat.c b/src/hashcat.c index c961f7fe7..d304217b0 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -271,7 +271,6 @@ int main (int argc, char **argv) if (1) { data.attack_mode = user_options->attack_mode; - data.benchmark = user_options->benchmark; data.force = user_options->force; data.hex_charset = user_options->hex_charset; data.hex_salt = user_options->hex_salt; diff --git a/src/opencl.c b/src/opencl.c index 9e71cd216..01ff07288 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -244,7 +244,7 @@ int gidd_to_pw_t (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, con return 0; } -int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration) +int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, const user_options_t *user_options, hashconfig_t *hashconfig, const uint attack_exec, const uint attack_mode, const uint opts_type, const salt_t *salt_buf, const uint highest_pw_len, const uint pws_cnt, const uint fast_iteration) { cl_int CL_err = CL_SUCCESS; @@ -357,7 +357,7 @@ int choose_kernel (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, ha device_param->speed_ms[speed_pos] = speed_ms; - if (data.benchmark == true) + if (user_options->benchmark == true) { if (speed_ms > 4096) myabort (opencl_ctx); } @@ -1229,12 +1229,12 @@ int run_cracker (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hash } } - if (data.benchmark == true) + if (user_options->benchmark == true) { hc_timer_set (&device_param->timer_speed); } - int rc = choose_kernel (opencl_ctx, device_param, hashconfig, hashconfig->attack_exec, data.attack_mode, hashconfig->opts_type, salt_buf, highest_pw_len, pws_cnt, fast_iteration); + int rc = choose_kernel (opencl_ctx, device_param, user_options, hashconfig, hashconfig->attack_exec, data.attack_mode, hashconfig->opts_type, salt_buf, highest_pw_len, pws_cnt, fast_iteration); if (rc == -1) return -1; @@ -1242,7 +1242,7 @@ int run_cracker (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hash * result */ - if (data.benchmark == false) + if (user_options->benchmark == false) { check_cracked (opencl_ctx, device_param, user_options, hashconfig, hashes, salt_pos); } @@ -1290,7 +1290,7 @@ int run_cracker (opencl_ctx_t *opencl_ctx, hc_device_param_t *device_param, hash * benchmark */ - if (data.benchmark == true) break; + if (user_options->benchmark == true) break; if (opencl_ctx->run_thread_level2 == false) break; }