1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

More OpenCL variables rename

This commit is contained in:
Jens Steube 2019-05-02 17:30:46 +02:00
parent af8e317cf4
commit 50a6e720ca
6 changed files with 595 additions and 597 deletions

View File

@ -1243,93 +1243,91 @@ typedef struct hc_device_param
// API: cuda // API: cuda
bool is_cuda; bool is_cuda;
CUdevice cuda_device; CUdevice cuda_device;
CUcontext cuda_context; CUcontext cuda_context;
// API: opencl // API: opencl
bool is_opencl; bool is_opencl;
cl_device_id opencl_device; char *opencl_driver_version;
char *opencl_device_vendor;
char *opencl_device_version;
char *opencl_device_c_version;
char *opencl_driver_version; cl_device_type opencl_device_type;
char *opencl_device_vendor; cl_uint opencl_device_vendor_id;
char *opencl_device_version; cl_uint opencl_platform_vendor_id;
char *opencl_device_c_version;
//cl_platform_id opencl_platform;
cl_device_type opencl_device_type;
cl_uint opencl_device_vendor_id;
cl_uint opencl_platform_vendor_id;
cl_device_id opencl_device;
cl_context opencl_context; cl_context opencl_context;
cl_command_queue opencl_command_queue; cl_command_queue opencl_command_queue;
cl_kernel kernel1; cl_program opencl_program;
cl_kernel kernel12; cl_program opencl_program_mp;
cl_kernel kernel2; cl_program opencl_program_amp;
cl_kernel kernel23;
cl_kernel kernel3;
cl_kernel kernel4;
cl_kernel kernel_init2;
cl_kernel kernel_loop2;
cl_kernel kernel_mp;
cl_kernel kernel_mp_l;
cl_kernel kernel_mp_r;
cl_kernel kernel_amp;
cl_kernel kernel_tm;
cl_kernel kernel_memset;
cl_kernel kernel_atinit;
cl_kernel kernel_decompress;
cl_kernel kernel_aux1;
cl_kernel kernel_aux2;
cl_kernel kernel_aux3;
cl_kernel kernel_aux4;
cl_program program; cl_kernel opencl_kernel1;
cl_program program_mp; cl_kernel opencl_kernel12;
cl_program program_amp; cl_kernel opencl_kernel2;
cl_kernel opencl_kernel23;
cl_kernel opencl_kernel3;
cl_kernel opencl_kernel4;
cl_kernel opencl_kernel_init2;
cl_kernel opencl_kernel_loop2;
cl_kernel opencl_kernel_mp;
cl_kernel opencl_kernel_mp_l;
cl_kernel opencl_kernel_mp_r;
cl_kernel opencl_kernel_amp;
cl_kernel opencl_kernel_tm;
cl_kernel opencl_kernel_memset;
cl_kernel opencl_kernel_atinit;
cl_kernel opencl_kernel_decompress;
cl_kernel opencl_kernel_aux1;
cl_kernel opencl_kernel_aux2;
cl_kernel opencl_kernel_aux3;
cl_kernel opencl_kernel_aux4;
cl_mem d_pws_buf; cl_mem opencl_d_pws_buf;
cl_mem d_pws_amp_buf; cl_mem opencl_d_pws_amp_buf;
cl_mem d_pws_comp_buf; cl_mem opencl_d_pws_comp_buf;
cl_mem d_pws_idx; cl_mem opencl_d_pws_idx;
cl_mem d_words_buf_l; cl_mem opencl_d_words_buf_l;
cl_mem d_words_buf_r; cl_mem opencl_d_words_buf_r;
cl_mem d_rules; cl_mem opencl_d_rules;
cl_mem d_rules_c; cl_mem opencl_d_rules_c;
cl_mem d_combs; cl_mem opencl_d_combs;
cl_mem d_combs_c; cl_mem opencl_d_combs_c;
cl_mem d_bfs; cl_mem opencl_d_bfs;
cl_mem d_bfs_c; cl_mem opencl_d_bfs_c;
cl_mem d_tm_c; cl_mem opencl_d_tm_c;
cl_mem d_bitmap_s1_a; cl_mem opencl_d_bitmap_s1_a;
cl_mem d_bitmap_s1_b; cl_mem opencl_d_bitmap_s1_b;
cl_mem d_bitmap_s1_c; cl_mem opencl_d_bitmap_s1_c;
cl_mem d_bitmap_s1_d; cl_mem opencl_d_bitmap_s1_d;
cl_mem d_bitmap_s2_a; cl_mem opencl_d_bitmap_s2_a;
cl_mem d_bitmap_s2_b; cl_mem opencl_d_bitmap_s2_b;
cl_mem d_bitmap_s2_c; cl_mem opencl_d_bitmap_s2_c;
cl_mem d_bitmap_s2_d; cl_mem opencl_d_bitmap_s2_d;
cl_mem d_plain_bufs; cl_mem opencl_d_plain_bufs;
cl_mem d_digests_buf; cl_mem opencl_d_digests_buf;
cl_mem d_digests_shown; cl_mem opencl_d_digests_shown;
cl_mem d_salt_bufs; cl_mem opencl_d_salt_bufs;
cl_mem d_esalt_bufs; cl_mem opencl_d_esalt_bufs;
cl_mem d_tmps; cl_mem opencl_d_tmps;
cl_mem d_hooks; cl_mem opencl_d_hooks;
cl_mem d_result; cl_mem opencl_d_result;
cl_mem d_extra0_buf; cl_mem opencl_d_extra0_buf;
cl_mem d_extra1_buf; cl_mem opencl_d_extra1_buf;
cl_mem d_extra2_buf; cl_mem opencl_d_extra2_buf;
cl_mem d_extra3_buf; cl_mem opencl_d_extra3_buf;
cl_mem d_root_css_buf; cl_mem opencl_d_root_css_buf;
cl_mem d_markov_css_buf; cl_mem opencl_d_markov_css_buf;
cl_mem d_st_digests_buf; cl_mem opencl_d_st_digests_buf;
cl_mem d_st_salts_buf; cl_mem opencl_d_st_salts_buf;
cl_mem d_st_esalts_buf; cl_mem opencl_d_st_esalts_buf;
} hc_device_param_t; } hc_device_param_t;

View File

@ -4,7 +4,7 @@
## ##
SHARED := 0 SHARED := 0
DEBUG := 1 DEBUG := 0
PRODUCTION := 0 PRODUCTION := 0
PRODUCTION_VERSION := v5.1.0 PRODUCTION_VERSION := v5.1.0
ENABLE_BRAIN := 1 ENABLE_BRAIN := 1

View File

@ -105,7 +105,7 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
int CL_rc; int CL_rc;
CL_rc = run_kernel_atinit (hashcat_ctx, device_param, device_param->d_pws_buf, kernel_power_max); CL_rc = run_kernel_atinit (hashcat_ctx, device_param, device_param->opencl_d_pws_buf, kernel_power_max);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
@ -118,7 +118,7 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
{ {
if (straight_ctx->kernel_rules_cnt > 1) if (straight_ctx->kernel_rules_cnt > 1)
{ {
CL_rc = hc_clEnqueueCopyBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_rules, device_param->d_rules_c, 0, 0, MIN (kernel_loops_max, KERNEL_RULES) * sizeof (kernel_rule_t), 0, NULL, NULL); CL_rc = hc_clEnqueueCopyBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_rules, device_param->opencl_d_rules_c, 0, 0, MIN (kernel_loops_max, KERNEL_RULES) * sizeof (kernel_rule_t), 0, NULL, NULL);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
} }
@ -230,21 +230,21 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
// reset them fake words // reset them fake words
CL_rc = run_kernel_memset (hashcat_ctx, device_param, device_param->d_pws_buf, 0, device_param->size_pws); CL_rc = run_kernel_memset (hashcat_ctx, device_param, device_param->opencl_d_pws_buf, 0, device_param->size_pws);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
// reset other buffers in case autotune cracked something // reset other buffers in case autotune cracked something
CL_rc = run_kernel_memset (hashcat_ctx, device_param, device_param->d_plain_bufs, 0, device_param->size_plains); CL_rc = run_kernel_memset (hashcat_ctx, device_param, device_param->opencl_d_plain_bufs, 0, device_param->size_plains);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
CL_rc = run_kernel_memset (hashcat_ctx, device_param, device_param->d_digests_shown, 0, device_param->size_shown); CL_rc = run_kernel_memset (hashcat_ctx, device_param, device_param->opencl_d_digests_shown, 0, device_param->size_shown);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
CL_rc = run_kernel_memset (hashcat_ctx, device_param, device_param->d_result, 0, device_param->size_results); CL_rc = run_kernel_memset (hashcat_ctx, device_param, device_param->opencl_d_result, 0, device_param->size_results);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;

File diff suppressed because it is too large Load Diff

View File

@ -309,7 +309,7 @@ void check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pl
{ {
tmps = hcmalloc (hashconfig->tmp_size); tmps = hcmalloc (hashconfig->tmp_size);
hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_tmps, CL_TRUE, plain->gidvid * hashconfig->tmp_size, hashconfig->tmp_size, tmps, 0, NULL, NULL); hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_tmps, CL_TRUE, plain->gidvid * hashconfig->tmp_size, hashconfig->tmp_size, tmps, 0, NULL, NULL);
} }
// hash // hash
@ -462,7 +462,7 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
cl_int CL_err; cl_int CL_err;
CL_err = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_result, CL_TRUE, 0, sizeof (u32), &num_cracked, 0, NULL, NULL); CL_err = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_result, CL_TRUE, 0, sizeof (u32), &num_cracked, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) if (CL_err != CL_SUCCESS)
{ {
@ -483,7 +483,7 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
{ {
plain_t *cracked = (plain_t *) hccalloc (num_cracked, sizeof (plain_t)); plain_t *cracked = (plain_t *) hccalloc (num_cracked, sizeof (plain_t));
CL_err = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_plain_bufs, CL_TRUE, 0, num_cracked * sizeof (plain_t), cracked, 0, NULL, NULL); CL_err = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_plain_bufs, CL_TRUE, 0, num_cracked * sizeof (plain_t), cracked, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) if (CL_err != CL_SUCCESS)
{ {
@ -553,7 +553,7 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
memset (hashes->digests_shown_tmp, 0, salt_buf->digests_cnt * sizeof (u32)); memset (hashes->digests_shown_tmp, 0, salt_buf->digests_cnt * sizeof (u32));
CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_digests_shown, CL_TRUE, salt_buf->digests_offset * sizeof (u32), salt_buf->digests_cnt * sizeof (u32), &hashes->digests_shown_tmp[salt_buf->digests_offset], 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_digests_shown, CL_TRUE, salt_buf->digests_offset * sizeof (u32), salt_buf->digests_cnt * sizeof (u32), &hashes->digests_shown_tmp[salt_buf->digests_offset], 0, NULL, NULL);
if (CL_err != CL_SUCCESS) if (CL_err != CL_SUCCESS)
{ {
@ -565,7 +565,7 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
num_cracked = 0; num_cracked = 0;
CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_result, CL_TRUE, 0, sizeof (u32), &num_cracked, 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_result, CL_TRUE, 0, sizeof (u32), &num_cracked, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) if (CL_err != CL_SUCCESS)
{ {

View File

@ -29,9 +29,9 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
// init : replace hashes with selftest hash // init : replace hashes with selftest hash
device_param->kernel_params[15] = &device_param->d_st_digests_buf; device_param->kernel_params[15] = &device_param->opencl_d_st_digests_buf;
device_param->kernel_params[17] = &device_param->d_st_salts_buf; device_param->kernel_params[17] = &device_param->opencl_d_st_salts_buf;
device_param->kernel_params[18] = &device_param->d_st_esalts_buf; device_param->kernel_params[18] = &device_param->opencl_d_st_esalts_buf;
device_param->kernel_params_buf32[31] = 1; device_param->kernel_params_buf32[31] = 1;
device_param->kernel_params_buf32[32] = 0; device_param->kernel_params_buf32[32] = 0;
@ -57,7 +57,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
pw.pw_len = (u32) pw_len; pw.pw_len = (u32) pw_len;
CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) return -1; if (CL_err != CL_SUCCESS) return -1;
} }
@ -84,7 +84,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
uppercase ((u8 *) pw_ptr, pw.pw_len); uppercase ((u8 *) pw_ptr, pw.pw_len);
} }
CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) return -1; if (CL_err != CL_SUCCESS) return -1;
} }
@ -136,11 +136,11 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
comb_ptr[comb.pw_len] = 0x80; comb_ptr[comb.pw_len] = 0x80;
} }
CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_combs_c, CL_TRUE, 0, 1 * sizeof (pw_t), &comb, 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_combs_c, CL_TRUE, 0, 1 * sizeof (pw_t), &comb, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) return -1; if (CL_err != CL_SUCCESS) return -1;
CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) return -1; if (CL_err != CL_SUCCESS) return -1;
} }
@ -165,7 +165,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
pw.pw_len = (u32) pw_len; pw.pw_len = (u32) pw_len;
CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) return -1; if (CL_err != CL_SUCCESS) return -1;
} }
@ -208,7 +208,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
bf.i = byte_swap_32 (bf.i); bf.i = byte_swap_32 (bf.i);
} }
CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_bfs_c, CL_TRUE, 0, 1 * sizeof (bf_t), &bf, 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_bfs_c, CL_TRUE, 0, 1 * sizeof (bf_t), &bf, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) return -1; if (CL_err != CL_SUCCESS) return -1;
@ -296,7 +296,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
for (int i = 0; i < 14; i++) pw.i[i] = byte_swap_32 (pw.i[i]); for (int i = 0; i < 14; i++) pw.i[i] = byte_swap_32 (pw.i[i]);
} }
CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) return -1; if (CL_err != CL_SUCCESS) return -1;
@ -316,7 +316,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
pw.pw_len = (u32) pw_len; pw.pw_len = (u32) pw_len;
CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL); CL_err = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_TRUE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) return -1; if (CL_err != CL_SUCCESS) return -1;
} }
@ -372,13 +372,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
CL_rc = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_hooks, CL_TRUE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL); CL_rc = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_hooks, CL_TRUE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
module_ctx->module_hook12 (device_param, hashes->st_hook_salts_buf, 0, 1); module_ctx->module_hook12 (device_param, hashes->st_hook_salts_buf, 0, 1);
CL_rc = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_hooks, CL_TRUE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL); CL_rc = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_hooks, CL_TRUE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
} }
@ -411,13 +411,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
CL_rc = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_hooks, CL_TRUE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL); CL_rc = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_hooks, CL_TRUE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
module_ctx->module_hook23 (device_param, hashes->st_hook_salts_buf, 0, 1); module_ctx->module_hook23 (device_param, hashes->st_hook_salts_buf, 0, 1);
CL_rc = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_hooks, CL_TRUE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL); CL_rc = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_hooks, CL_TRUE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
} }
@ -492,7 +492,7 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
u32 num_cracked; u32 num_cracked;
CL_err = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->d_result, CL_TRUE, 0, sizeof (u32), &num_cracked, 0, NULL, NULL); CL_err = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_result, CL_TRUE, 0, sizeof (u32), &num_cracked, 0, NULL, NULL);
if (CL_err != CL_SUCCESS) return -1; if (CL_err != CL_SUCCESS) return -1;
@ -507,20 +507,20 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
device_param->kernel_params_buf32[33] = 0; device_param->kernel_params_buf32[33] = 0;
device_param->kernel_params_buf64[34] = 0; device_param->kernel_params_buf64[34] = 0;
device_param->kernel_params[15] = &device_param->d_digests_buf; device_param->kernel_params[15] = &device_param->opencl_d_digests_buf;
device_param->kernel_params[17] = &device_param->d_salt_bufs; device_param->kernel_params[17] = &device_param->opencl_d_salt_bufs;
device_param->kernel_params[18] = &device_param->d_esalt_bufs; device_param->kernel_params[18] = &device_param->opencl_d_esalt_bufs;
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_pws_buf, device_param->size_pws); if (CL_rc == -1) return -1; CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_pws_buf, device_param->size_pws); if (CL_rc == -1) return -1;
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_tmps, device_param->size_tmps); if (CL_rc == -1) return -1; CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_tmps, device_param->size_tmps); if (CL_rc == -1) return -1;
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_hooks, device_param->size_hooks); if (CL_rc == -1) return -1; CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_hooks, device_param->size_hooks); if (CL_rc == -1) return -1;
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_plain_bufs, device_param->size_plains); if (CL_rc == -1) return -1; CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_plain_bufs, device_param->size_plains); if (CL_rc == -1) return -1;
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_digests_shown, device_param->size_shown); if (CL_rc == -1) return -1; CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_digests_shown, device_param->size_shown); if (CL_rc == -1) return -1;
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_result, device_param->size_results); if (CL_rc == -1) return -1; CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_result, device_param->size_results); if (CL_rc == -1) return -1;
if (user_options->slow_candidates == true) if (user_options->slow_candidates == true)
{ {
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_rules_c, device_param->size_rules_c); CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_rules_c, device_param->size_rules_c);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
} }
@ -528,19 +528,19 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
{ {
if (user_options_extra->attack_kern == ATTACK_KERN_STRAIGHT) if (user_options_extra->attack_kern == ATTACK_KERN_STRAIGHT)
{ {
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_rules_c, device_param->size_rules_c); CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_rules_c, device_param->size_rules_c);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
} }
else if (user_options_extra->attack_kern == ATTACK_KERN_COMBI) else if (user_options_extra->attack_kern == ATTACK_KERN_COMBI)
{ {
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_combs_c, device_param->size_combs); CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_combs_c, device_param->size_combs);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
} }
else if (user_options_extra->attack_kern == ATTACK_KERN_BF) else if (user_options_extra->attack_kern == ATTACK_KERN_BF)
{ {
CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->d_bfs_c, device_param->size_bfs); CL_rc = run_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_bfs_c, device_param->size_bfs);
if (CL_rc == -1) return -1; if (CL_rc == -1) return -1;
} }