From a1ced245642f06889d48be7a15ab3fd559842d19 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Sat, 22 Jan 2022 12:10:09 +0100 Subject: [PATCH 1/8] Fixed bug on benchmark engine, add some unstable warnings, updated negative status code --- docs/changes.txt | 8 + docs/status_codes.txt | 7 +- include/types.h | 1 + src/backend.c | 1034 +++++++++++++++++++++++++++++++----- src/hashcat.c | 7 +- src/modules/module_10700.c | 13 +- src/modules/module_11700.c | 13 +- src/modules/module_11750.c | 13 +- src/modules/module_11760.c | 13 +- src/modules/module_11800.c | 13 +- src/modules/module_11850.c | 13 +- src/modules/module_11860.c | 13 +- src/modules/module_13733.c | 13 +- src/modules/module_13773.c | 6 + src/modules/module_17200.c | 6 + src/modules/module_17220.c | 6 + src/modules/module_17225.c | 6 + src/modules/module_19200.c | 6 + src/modules/module_21600.c | 13 +- src/modules/module_21800.c | 6 + 20 files changed, 1076 insertions(+), 134 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 77e087ea7..1f5d68695 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -34,6 +34,7 @@ - Fixed Unit Test salt-max in case of optimized kernel, with hash-type 22 and 23 - Fixed Unit Test false negative if there are spaces in the filesystem path to hashcat - Fixed --hash-info example password output: force uppercase if OPTS_TYPE_PT_UPPER is set +- Fixed bug on benchmark engine, avoid skipping all devices in case of "kernel create error" in one of them ## ## Technical @@ -57,6 +58,13 @@ - Unit tests: added -r (--runtime) option - Unit tests: handle negative status code, skip deprecated hash-types, skip hash-types with known perl modules issues, updated output - Hash Info: show more information (Updated Hash-Format. Added Autodetect, Self-Test, Potfile and Plaintext encoding) +- Status code: updated negative status code (added kernel create failure and resync) + +## +## Improvements +## + +- OpenCL Runtime: Add some unstable warnings detected on macOS * changes v6.2.4 -> v6.2.5 diff --git a/docs/status_codes.txt b/docs/status_codes.txt index b7889ff2e..c93a9e6b4 100644 --- a/docs/status_codes.txt +++ b/docs/status_codes.txt @@ -1,9 +1,10 @@ status codes on exit: ===================== --8 = mixed backend errors (combo of -3, -4, -5, -6, -7 errors type) --7 = backend error: Invalid module_extra_buffer_size --6 = backend error: Too many compute units to keep minimum kernel accel limit +-9 = mixed backend errors (combo of -3, -4, -5, -6, -7 errors type) +-8 = backend error: Invalid module_extra_buffer_size +-7 = backend error: Too many compute units to keep minimum kernel accel limit +-6 = backend error: kernel create error -5 = backend error: main kernel build error -4 = backend error: memory hit -3 = backend error: skipping hash-type due to module_unstable_warning settings diff --git a/include/types.h b/include/types.h index d665dd8ad..d6b6428a3 100644 --- a/include/types.h +++ b/include/types.h @@ -1688,6 +1688,7 @@ typedef struct backend_ctx bool memory_hit_warning; bool runtime_skip_warning; bool kernel_build_warning; + bool kernel_create_warning; bool kernel_accel_warnings; bool extra_size_warning; bool mixed_warnings; diff --git a/src/backend.c b/src/backend.c index 53a2fb819..7c4a96652 100644 --- a/src/backend.c +++ b/src/backend.c @@ -7315,18 +7315,20 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) u32 hardware_power_all = 0; - int backend_memory_hit_warnings = 0; - int backend_runtime_skip_warnings = 0; - int backend_kernel_build_warnings = 0; - int backend_kernel_accel_warnings = 0; - int backend_extra_size_warning = 0; + int backend_memory_hit_warnings = 0; + int backend_runtime_skip_warnings = 0; + int backend_kernel_build_warnings = 0; + int backend_kernel_create_warnings = 0; + int backend_kernel_accel_warnings = 0; + int backend_extra_size_warning = 0; - backend_ctx->memory_hit_warning = false; - backend_ctx->runtime_skip_warning = false; - backend_ctx->kernel_build_warning = false; + backend_ctx->memory_hit_warning = false; + backend_ctx->runtime_skip_warning = false; + backend_ctx->kernel_build_warning = false; + backend_ctx->kernel_create_warning = false; backend_ctx->kernel_accel_warnings = false; - backend_ctx->extra_size_warning = false; - backend_ctx->mixed_warnings = false; + backend_ctx->extra_size_warning = false; + backend_ctx->mixed_warnings = false; for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++) { @@ -8174,7 +8176,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { // GPU memset - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_memset, device_param->cuda_module_shared, "gpu_memset") == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_memset, device_param->cuda_module_shared, "gpu_memset") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_memset"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_memset, &device_param->kernel_wgs_memset) == -1) return -1; @@ -8186,7 +8196,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU bzero - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_bzero, device_param->cuda_module_shared, "gpu_bzero") == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_bzero, device_param->cuda_module_shared, "gpu_bzero") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_bzero"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_bzero, &device_param->kernel_wgs_bzero) == -1) return -1; @@ -8198,7 +8216,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU autotune init - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_atinit, device_param->cuda_module_shared, "gpu_atinit") == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_atinit, device_param->cuda_module_shared, "gpu_atinit") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_atinit"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_atinit, &device_param->kernel_wgs_atinit) == -1) return -1; @@ -8213,7 +8239,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU decompress - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_decompress, device_param->cuda_module_shared, "gpu_decompress") == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_decompress, device_param->cuda_module_shared, "gpu_decompress") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_decompress"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_decompress, &device_param->kernel_wgs_decompress) == -1) return -1; @@ -8225,7 +8259,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU utf8 to utf16le conversion - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_utf8toutf16le, device_param->cuda_module_shared, "gpu_utf8_to_utf16") == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_utf8toutf16le, device_param->cuda_module_shared, "gpu_utf8_to_utf16") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_utf8_to_utf16"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_utf8toutf16le, &device_param->kernel_wgs_utf8toutf16le) == -1) return -1; @@ -8240,7 +8282,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { // GPU memset - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_memset, device_param->hip_module_shared, "gpu_memset") == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_memset, device_param->hip_module_shared, "gpu_memset") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_memset"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_memset, &device_param->kernel_wgs_memset) == -1) return -1; @@ -8252,7 +8302,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU bzero - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_bzero, device_param->hip_module_shared, "gpu_bzero") == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_bzero, device_param->hip_module_shared, "gpu_bzero") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_bzero"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_bzero, &device_param->kernel_wgs_bzero) == -1) return -1; @@ -8264,7 +8322,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU autotune init - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_atinit, device_param->hip_module_shared, "gpu_atinit") == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_atinit, device_param->hip_module_shared, "gpu_atinit") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_atinit"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_atinit, &device_param->kernel_wgs_atinit) == -1) return -1; @@ -8279,7 +8345,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU decompress - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_decompress, device_param->hip_module_shared, "gpu_decompress") == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_decompress, device_param->hip_module_shared, "gpu_decompress") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_decompress"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_decompress, &device_param->kernel_wgs_decompress) == -1) return -1; @@ -8291,7 +8365,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU utf8 to utf16le conversion - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_utf8toutf16le, device_param->hip_module_shared, "gpu_utf8_to_utf16") == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_utf8toutf16le, device_param->hip_module_shared, "gpu_utf8_to_utf16") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_utf8_to_utf16"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_utf8toutf16le, &device_param->kernel_wgs_utf8toutf16le) == -1) return -1; @@ -8306,7 +8388,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { // GPU memset - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_shared, "gpu_memset", &device_param->opencl_kernel_memset) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_shared, "gpu_memset", &device_param->opencl_kernel_memset) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_memset"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_memset, &device_param->kernel_wgs_memset) == -1) return -1; @@ -8318,7 +8408,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU bzero - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_shared, "gpu_bzero", &device_param->opencl_kernel_bzero) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_shared, "gpu_bzero", &device_param->opencl_kernel_bzero) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_bzero"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_bzero, &device_param->kernel_wgs_bzero) == -1) return -1; @@ -8334,7 +8432,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU autotune init - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_shared, "gpu_atinit", &device_param->opencl_kernel_atinit) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_shared, "gpu_atinit", &device_param->opencl_kernel_atinit) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_atinit"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_atinit, &device_param->kernel_wgs_atinit) == -1) return -1; @@ -8346,7 +8452,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU decompress - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_shared, "gpu_decompress", &device_param->opencl_kernel_decompress) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_shared, "gpu_decompress", &device_param->opencl_kernel_decompress) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_decompress"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_decompress, &device_param->kernel_wgs_decompress) == -1) return -1; @@ -8358,7 +8472,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // GPU utf8 to utf16le conversion - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_shared, "gpu_utf8_to_utf16", &device_param->opencl_kernel_utf8toutf16le) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_shared, "gpu_utf8_to_utf16", &device_param->opencl_kernel_utf8toutf16le) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "gpu_utf8_to_utf16"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_utf8toutf16le, &device_param->kernel_wgs_utf8toutf16le) == -1) return -1; @@ -9352,7 +9474,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_s%02d", kern_type, 4); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function1, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function1, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function1, &device_param->kernel_wgs1) == -1) return -1; @@ -9366,7 +9496,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_s%02d", kern_type, 8); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function2, &device_param->kernel_wgs2) == -1) return -1; @@ -9380,7 +9518,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_s%02d", kern_type, 16); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function3, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function3, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function3, &device_param->kernel_wgs3) == -1) return -1; @@ -9394,7 +9540,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_sxx", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function4, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function4, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function4, &device_param->kernel_wgs4) == -1) return -1; @@ -9413,7 +9567,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_m%02d", kern_type, 4); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function1, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function1, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function1, &device_param->kernel_wgs1) == -1) return -1; @@ -9427,7 +9589,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_m%02d", kern_type, 8); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function2, &device_param->kernel_wgs2) == -1) return -1; @@ -9441,7 +9611,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_m%02d", kern_type, 16); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function3, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function3, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function3, &device_param->kernel_wgs3) == -1) return -1; @@ -9455,7 +9633,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_mxx", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function4, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function4, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function4, &device_param->kernel_wgs4) == -1) return -1; @@ -9478,7 +9664,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_tm", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_tm, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_tm, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_tm, &device_param->kernel_wgs_tm) == -1) return -1; @@ -9497,7 +9691,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_init", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function1, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function1, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function1, &device_param->kernel_wgs1) == -1) return -1; @@ -9511,7 +9713,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function2, &device_param->kernel_wgs2) == -1) return -1; @@ -9525,7 +9735,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_comp", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function3, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function3, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function3, &device_param->kernel_wgs3) == -1) return -1; @@ -9541,7 +9759,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop_prepare", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2p, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2p, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function2p, &device_param->kernel_wgs2p) == -1) return -1; @@ -9558,7 +9784,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop_extended", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2e, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function2e, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function2e, &device_param->kernel_wgs2e) == -1) return -1; @@ -9575,7 +9809,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_hook12", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function12, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function12, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function12, &device_param->kernel_wgs12) == -1) return -1; @@ -9592,7 +9834,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_hook23", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function23, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function23, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function23, &device_param->kernel_wgs23) == -1) return -1; @@ -9609,7 +9859,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_init2", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_init2, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_init2, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_init2, &device_param->kernel_wgs_init2) == -1) return -1; @@ -9626,7 +9884,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop2_prepare", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_loop2p, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_loop2p, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_loop2p, &device_param->kernel_wgs_loop2p) == -1) return -1; @@ -9643,7 +9909,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop2", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_loop2, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_loop2, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_loop2, &device_param->kernel_wgs_loop2) == -1) return -1; @@ -9660,7 +9934,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux1", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_aux1, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_aux1, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_aux1, &device_param->kernel_wgs_aux1) == -1) return -1; @@ -9677,7 +9959,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux2", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_aux2, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_aux2, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_aux2, &device_param->kernel_wgs_aux2) == -1) return -1; @@ -9694,7 +9984,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux3", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_aux3, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_aux3, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_aux3, &device_param->kernel_wgs_aux3) == -1) return -1; @@ -9711,7 +10009,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux4", kern_type); - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_aux4, device_param->cuda_module, kernel_name) == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_aux4, device_param->cuda_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_aux4, &device_param->kernel_wgs_aux4) == -1) return -1; @@ -9739,7 +10045,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { // mp_l - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_mp_l, device_param->cuda_module_mp, "l_markov") == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_mp_l, device_param->cuda_module_mp, "l_markov") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "l_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_mp_l, &device_param->kernel_wgs_mp_l) == -1) return -1; @@ -9751,7 +10065,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // mp_r - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_mp_r, device_param->cuda_module_mp, "r_markov") == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_mp_r, device_param->cuda_module_mp, "r_markov") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "r_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_mp_r, &device_param->kernel_wgs_mp_r) == -1) return -1; @@ -9772,7 +10094,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } else if (user_options->attack_mode == ATTACK_MODE_HYBRID1) { - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_mp, device_param->cuda_module_mp, "C_markov") == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_mp, device_param->cuda_module_mp, "C_markov") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "C_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_mp, &device_param->kernel_wgs_mp) == -1) return -1; @@ -9784,7 +10114,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } else if (user_options->attack_mode == ATTACK_MODE_HYBRID2) { - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_mp, device_param->cuda_module_mp, "C_markov") == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_mp, device_param->cuda_module_mp, "C_markov") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "C_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_mp, &device_param->kernel_wgs_mp) == -1) return -1; @@ -9807,7 +10145,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } else { - if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_amp, device_param->cuda_module_amp, "amp") == -1) return -1; + if (hc_cuModuleGetFunction (hashcat_ctx, &device_param->cuda_function_amp, device_param->cuda_module_amp, "amp") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "amp"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_cuda_kernel_wgs (hashcat_ctx, device_param->cuda_function_amp, &device_param->kernel_wgs_amp) == -1) return -1; @@ -9954,7 +10300,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_s%02d", kern_type, 4); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function1, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function1, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function1, &device_param->kernel_wgs1) == -1) return -1; @@ -9968,7 +10322,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_s%02d", kern_type, 8); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function2, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function2, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function2, &device_param->kernel_wgs2) == -1) return -1; @@ -9982,7 +10344,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_s%02d", kern_type, 16); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function3, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function3, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function3, &device_param->kernel_wgs3) == -1) return -1; @@ -9996,7 +10366,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_sxx", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function4, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function4, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function4, &device_param->kernel_wgs4) == -1) return -1; @@ -10015,7 +10393,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_m%02d", kern_type, 4); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function1, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function1, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function1, &device_param->kernel_wgs1) == -1) return -1; @@ -10029,7 +10415,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_m%02d", kern_type, 8); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function2, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function2, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function2, &device_param->kernel_wgs2) == -1) return -1; @@ -10043,7 +10437,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_m%02d", kern_type, 16); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function3, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function3, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function3, &device_param->kernel_wgs3) == -1) return -1; @@ -10057,7 +10459,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_mxx", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function4, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function4, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function4, &device_param->kernel_wgs4) == -1) return -1; @@ -10080,7 +10490,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_tm", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_tm, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_tm, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_tm, &device_param->kernel_wgs_tm) == -1) return -1; @@ -10099,7 +10517,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_init", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function1, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function1, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function1, &device_param->kernel_wgs1) == -1) return -1; @@ -10113,7 +10539,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function2, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function2, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function2, &device_param->kernel_wgs2) == -1) return -1; @@ -10127,7 +10561,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_comp", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function3, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function3, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function3, &device_param->kernel_wgs3) == -1) return -1; @@ -10143,7 +10585,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop_prepare", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function2p, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function2p, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function2p, &device_param->kernel_wgs2p) == -1) return -1; @@ -10160,7 +10610,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop_extended", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function2e, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function2e, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function2e, &device_param->kernel_wgs2e) == -1) return -1; @@ -10177,7 +10635,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_hook12", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function12, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function12, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function12, &device_param->kernel_wgs12) == -1) return -1; @@ -10194,7 +10660,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_hook23", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function23, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function23, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function23, &device_param->kernel_wgs23) == -1) return -1; @@ -10211,7 +10685,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_init2", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_init2, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_init2, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_init2, &device_param->kernel_wgs_init2) == -1) return -1; @@ -10228,7 +10710,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop2_prepare", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_loop2p, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_loop2p, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_loop2p, &device_param->kernel_wgs_loop2p) == -1) return -1; @@ -10245,7 +10735,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop2", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_loop2, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_loop2, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_loop2, &device_param->kernel_wgs_loop2) == -1) return -1; @@ -10262,7 +10760,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux1", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_aux1, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_aux1, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_aux1, &device_param->kernel_wgs_aux1) == -1) return -1; @@ -10279,7 +10785,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux2", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_aux2, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_aux2, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_aux2, &device_param->kernel_wgs_aux2) == -1) return -1; @@ -10296,7 +10810,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux3", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_aux3, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_aux3, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_aux3, &device_param->kernel_wgs_aux3) == -1) return -1; @@ -10313,7 +10835,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux4", kern_type); - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_aux4, device_param->hip_module, kernel_name) == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_aux4, device_param->hip_module, kernel_name) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_aux4, &device_param->kernel_wgs_aux4) == -1) return -1; @@ -10341,7 +10871,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { // mp_l - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_mp_l, device_param->hip_module_mp, "l_markov") == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_mp_l, device_param->hip_module_mp, "l_markov") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "l_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_mp_l, &device_param->kernel_wgs_mp_l) == -1) return -1; @@ -10353,7 +10891,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // mp_r - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_mp_r, device_param->hip_module_mp, "r_markov") == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_mp_r, device_param->hip_module_mp, "r_markov") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "r_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_mp_r, &device_param->kernel_wgs_mp_r) == -1) return -1; @@ -10374,7 +10920,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } else if (user_options->attack_mode == ATTACK_MODE_HYBRID1) { - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_mp, device_param->hip_module_mp, "C_markov") == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_mp, device_param->hip_module_mp, "C_markov") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "C_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_mp, &device_param->kernel_wgs_mp) == -1) return -1; @@ -10386,7 +10940,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } else if (user_options->attack_mode == ATTACK_MODE_HYBRID2) { - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_mp, device_param->hip_module_mp, "C_markov") == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_mp, device_param->hip_module_mp, "C_markov") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "C_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_mp, &device_param->kernel_wgs_mp) == -1) return -1; @@ -10409,7 +10971,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } else { - if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_amp, device_param->hip_module_amp, "amp") == -1) return -1; + if (hc_hipModuleGetFunction (hashcat_ctx, &device_param->hip_function_amp, device_param->hip_module_amp, "amp") == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "amp"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_hip_kernel_wgs (hashcat_ctx, device_param->hip_function_amp, &device_param->kernel_wgs_amp) == -1) return -1; @@ -10573,7 +11143,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_s%02d", kern_type, 4); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel1) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel1) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel1, &device_param->kernel_wgs1) == -1) return -1; @@ -10587,7 +11165,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_s%02d", kern_type, 8); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel2, &device_param->kernel_wgs2) == -1) return -1; @@ -10601,7 +11187,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_s%02d", kern_type, 16); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel3) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel3) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel3, &device_param->kernel_wgs3) == -1) return -1; @@ -10615,7 +11209,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_sxx", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel4) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel4) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel4, &device_param->kernel_wgs4) == -1) return -1; @@ -10634,7 +11236,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_m%02d", kern_type, 4); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel1) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel1) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel1, &device_param->kernel_wgs1) == -1) return -1; @@ -10648,7 +11258,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_m%02d", kern_type, 8); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel2, &device_param->kernel_wgs2) == -1) return -1; @@ -10662,7 +11280,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_m%02d", kern_type, 16); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel3) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel3) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel3, &device_param->kernel_wgs3) == -1) return -1; @@ -10676,7 +11302,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_mxx", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel4) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel4) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel4, &device_param->kernel_wgs4) == -1) return -1; @@ -10699,7 +11333,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_tm", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_tm) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_tm) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_tm, &device_param->kernel_wgs_tm) == -1) return -1; @@ -10718,7 +11360,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_init", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel1) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel1) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel1, &device_param->kernel_wgs1) == -1) return -1; @@ -10732,7 +11382,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel2, &device_param->kernel_wgs2) == -1) return -1; @@ -10746,7 +11404,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) snprintf (kernel_name, sizeof (kernel_name), "m%05u_comp", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel3) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel3) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel3, &device_param->kernel_wgs3) == -1) return -1; @@ -10762,7 +11428,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop_prepare", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2p) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2p) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel2p, &device_param->kernel_wgs2p) == -1) return -1; @@ -10777,7 +11451,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop_extended", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2e) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel2e) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel2e, &device_param->kernel_wgs2e) == -1) return -1; @@ -10794,7 +11476,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_hook12", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel12) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel12) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel12, &device_param->kernel_wgs12) == -1) return -1; @@ -10811,7 +11501,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_hook23", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel23) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel23) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel23, &device_param->kernel_wgs23) == -1) return -1; @@ -10828,7 +11526,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_init2", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_init2) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_init2) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_init2, &device_param->kernel_wgs_init2) == -1) return -1; @@ -10845,7 +11551,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop2_prepare", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_loop2p) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_loop2p) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_loop2p, &device_param->kernel_wgs_loop2p) == -1) return -1; @@ -10862,7 +11576,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_loop2", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_loop2) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_loop2) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_loop2, &device_param->kernel_wgs_loop2) == -1) return -1; @@ -10879,7 +11601,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux1", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_aux1) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_aux1) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_aux1, &device_param->kernel_wgs_aux1) == -1) return -1; @@ -10896,7 +11626,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux2", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_aux2) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_aux2) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_aux2, &device_param->kernel_wgs_aux2) == -1) return -1; @@ -10913,7 +11651,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux3", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_aux3) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_aux3) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_aux3, &device_param->kernel_wgs_aux3) == -1) return -1; @@ -10930,7 +11676,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { snprintf (kernel_name, sizeof (kernel_name), "m%05u_aux4", kern_type); - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_aux4) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program, kernel_name, &device_param->opencl_kernel_aux4) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, kernel_name); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_aux4, &device_param->kernel_wgs_aux4) == -1) return -1; @@ -10953,7 +11707,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) { // mp_l - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_mp, "l_markov", &device_param->opencl_kernel_mp_l) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_mp, "l_markov", &device_param->opencl_kernel_mp_l) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "l_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_mp_l, &device_param->kernel_wgs_mp_l) == -1) return -1; @@ -10965,7 +11727,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) // mp_r - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_mp, "r_markov", &device_param->opencl_kernel_mp_r) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_mp, "r_markov", &device_param->opencl_kernel_mp_r) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "r_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_mp_r, &device_param->kernel_wgs_mp_r) == -1) return -1; @@ -10986,7 +11756,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } else if (user_options->attack_mode == ATTACK_MODE_HYBRID1) { - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_mp, "C_markov", &device_param->opencl_kernel_mp) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_mp, "C_markov", &device_param->opencl_kernel_mp) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "C_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_mp, &device_param->kernel_wgs_mp) == -1) return -1; @@ -10998,7 +11776,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } else if (user_options->attack_mode == ATTACK_MODE_HYBRID2) { - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_mp, "C_markov", &device_param->opencl_kernel_mp) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_mp, "C_markov", &device_param->opencl_kernel_mp) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "C_markov"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_mp, &device_param->kernel_wgs_mp) == -1) return -1; @@ -11021,7 +11807,15 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) } else { - if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_amp, "amp", &device_param->opencl_kernel_amp) == -1) return -1; + if (hc_clCreateKernel (hashcat_ctx, device_param->opencl_program_amp, "amp", &device_param->opencl_kernel_amp) == -1) + { + event_log_warning (hashcat_ctx, "* Device #%u: Kernel %s create failed.", device_param->device_id + 1, "amp"); + + backend_kernel_create_warnings++; + + device_param->skipped_warning = true; + continue; + } if (get_opencl_kernel_wgs (hashcat_ctx, device_param, device_param->opencl_kernel_amp, &device_param->kernel_wgs_amp) == -1) return -1; @@ -11764,26 +12558,28 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) int rc = 0; - backend_ctx->memory_hit_warning = (backend_memory_hit_warnings == backend_ctx->backend_devices_active); - backend_ctx->runtime_skip_warning = (backend_runtime_skip_warnings == backend_ctx->backend_devices_active); - backend_ctx->kernel_build_warning = (backend_kernel_build_warnings == backend_ctx->backend_devices_active); - backend_ctx->kernel_accel_warnings = (backend_kernel_accel_warnings == backend_ctx->backend_devices_active); - backend_ctx->extra_size_warning = (backend_extra_size_warning == backend_ctx->backend_devices_active); + backend_ctx->memory_hit_warning = (backend_memory_hit_warnings == backend_ctx->backend_devices_active); + backend_ctx->runtime_skip_warning = (backend_runtime_skip_warnings == backend_ctx->backend_devices_active); + backend_ctx->kernel_build_warning = (backend_kernel_build_warnings == backend_ctx->backend_devices_active); + backend_ctx->kernel_create_warning = (backend_kernel_create_warnings == backend_ctx->backend_devices_active); + backend_ctx->kernel_accel_warnings = (backend_kernel_accel_warnings == backend_ctx->backend_devices_active); + backend_ctx->extra_size_warning = (backend_extra_size_warning == backend_ctx->backend_devices_active); // if all active devices failed, set rc to -1 // later we prevent hashcat exit if is started in benchmark mode - if ((backend_ctx->memory_hit_warning == true) || - (backend_ctx->runtime_skip_warning == true) || - (backend_ctx->kernel_build_warning == true) || + if ((backend_ctx->memory_hit_warning == true) || + (backend_ctx->runtime_skip_warning == true) || + (backend_ctx->kernel_build_warning == true) || + (backend_ctx->kernel_create_warning == true) || (backend_ctx->kernel_accel_warnings == true) || - (backend_ctx->extra_size_warning == true)) + (backend_ctx->extra_size_warning == true)) { rc = -1; } else { // handle mix of, in case of multiple devices with different warnings - backend_ctx->mixed_warnings = ((backend_memory_hit_warnings + backend_runtime_skip_warnings + backend_kernel_build_warnings + backend_kernel_accel_warnings + backend_extra_size_warning) == backend_ctx->backend_devices_active); + backend_ctx->mixed_warnings = ((backend_memory_hit_warnings + backend_runtime_skip_warnings + backend_kernel_build_warnings + backend_kernel_create_warnings + backend_kernel_accel_warnings + backend_extra_size_warning) == backend_ctx->backend_devices_active); if (backend_ctx->mixed_warnings) rc = -1; } diff --git a/src/hashcat.c b/src/hashcat.c index 91a25f2cf..d3e70a874 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -1751,9 +1751,10 @@ int hashcat_session_execute (hashcat_ctx_t *hashcat_ctx) if (backend_ctx->runtime_skip_warning == true) rc_final = -3; if (backend_ctx->memory_hit_warning == true) rc_final = -4; if (backend_ctx->kernel_build_warning == true) rc_final = -5; - if (backend_ctx->kernel_accel_warnings == true) rc_final = -6; - if (backend_ctx->extra_size_warning == true) rc_final = -7; - if (backend_ctx->mixed_warnings == true) rc_final = -8; + if (backend_ctx->kernel_create_warning == true) rc_final = -6; + if (backend_ctx->kernel_accel_warnings == true) rc_final = -7; + if (backend_ctx->extra_size_warning == true) rc_final = -8; + if (backend_ctx->mixed_warnings == true) rc_final = -9; } // special case for --stdout diff --git a/src/modules/module_10700.c b/src/modules/module_10700.c index 69bfe3b15..caf59e006 100644 --- a/src/modules/module_10700.c +++ b/src/modules/module_10700.c @@ -81,6 +81,17 @@ typedef struct pdf17l8_tmp static const char *SIGNATURE_PDF = "$pdf$"; static const int ROUNDS_PDF17L8 = 64; +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + // AppleM1, OpenCL, MTLCompilerService, createKernel: newComputePipelineState failed (or never-end with pure kernel) + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + + return false; +} + u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { const u64 esalt_size = (const u64) sizeof (pdf_t); @@ -390,6 +401,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = module_tmp_size; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_11700.c b/src/modules/module_11700.c index 2503d9a9f..c78b492ad 100644 --- a/src/modules/module_11700.c +++ b/src/modules/module_11700.c @@ -43,6 +43,17 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + // AppleM1, OpenCL, MTLCompilerService, createKernel: newComputePipelineState failed (pure/optimized kernel) + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + + return false; +} + char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -203,6 +214,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_11750.c b/src/modules/module_11750.c index 2b9612ec2..36dc8fb3c 100644 --- a/src/modules/module_11750.c +++ b/src/modules/module_11750.c @@ -43,6 +43,17 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + // AppleM1, OpenCL, MTLCompilerService, createKernel: newComputePipelineState failed (pure/optimized kernel) + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + + return false; +} + char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -230,6 +241,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_11760.c b/src/modules/module_11760.c index fff6181b8..dc0db26e4 100644 --- a/src/modules/module_11760.c +++ b/src/modules/module_11760.c @@ -43,6 +43,17 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + // AppleM1, OpenCL, MTLCompilerService, createKernel: newComputePipelineState failed (pure/optimized kernel) + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + + return false; +} + char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -230,6 +241,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_11800.c b/src/modules/module_11800.c index 0abef9faf..a8d72e1b9 100644 --- a/src/modules/module_11800.c +++ b/src/modules/module_11800.c @@ -43,6 +43,17 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + // AppleM1, OpenCL, MTLCompilerService, createKernel: newComputePipelineState failed (pure/optimized kernel) + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + + return false; +} + char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -227,6 +238,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_11850.c b/src/modules/module_11850.c index 115a70225..0c040d789 100644 --- a/src/modules/module_11850.c +++ b/src/modules/module_11850.c @@ -43,6 +43,17 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + // AppleM1, OpenCL, MTLCompilerService, createKernel: newComputePipelineState failed (pure/optimized kernel) + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + + return false; +} + char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -254,6 +265,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_11860.c b/src/modules/module_11860.c index f8a1d4307..5aaefec55 100644 --- a/src/modules/module_11860.c +++ b/src/modules/module_11860.c @@ -43,6 +43,17 @@ u32 module_salt_type (MAYBE_UNUSED const hashconfig_t *hashconfig, const char *module_st_hash (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_HASH; } const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { return ST_PASS; } +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + // AppleM1, OpenCL, MTLCompilerService, createKernel: newComputePipelineState failed (pure/optimized kernel) + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + + return false; +} + char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -254,6 +265,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_13733.c b/src/modules/module_13733.c index b95e24779..ac8b7c030 100644 --- a/src/modules/module_13733.c +++ b/src/modules/module_13733.c @@ -84,6 +84,17 @@ typedef struct vc static const int ROUNDS_VERACRYPT_500000 = 500000; static const float MIN_SUFFICIENT_ENTROPY_FILE = 7.0f; +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + // AppleM1, OpenCL, MTLCompilerService never-end (pure/optimized kernel) + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + + return false; +} + int module_build_plain_postprocess (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const void *tmps, const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, MAYBE_UNUSED const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz) { const vc_tmp_t *vc_tmp = (const vc_tmp_t *) tmps; @@ -352,6 +363,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = module_tmp_size; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_13773.c b/src/modules/module_13773.c index 022c0cbd8..d21cb6597 100644 --- a/src/modules/module_13773.c +++ b/src/modules/module_13773.c @@ -105,6 +105,12 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE } } + // AppleM1, OpenCL, MTLCompilerService never-end + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + return false; } diff --git a/src/modules/module_17200.c b/src/modules/module_17200.c index 4ce790d7d..92575d2fd 100644 --- a/src/modules/module_17200.c +++ b/src/modules/module_17200.c @@ -180,6 +180,12 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE return true; } + // AppleM1, OpenCL, MTLCompilerService never-end + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + return false; } diff --git a/src/modules/module_17220.c b/src/modules/module_17220.c index 20eb26eb4..2892c1206 100644 --- a/src/modules/module_17220.c +++ b/src/modules/module_17220.c @@ -180,6 +180,12 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE return true; } + // AppleM1, OpenCL, MTLCompilerService never-end + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + return false; } diff --git a/src/modules/module_17225.c b/src/modules/module_17225.c index efe614a26..286b9b57e 100644 --- a/src/modules/module_17225.c +++ b/src/modules/module_17225.c @@ -180,6 +180,12 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE return true; } + // AppleM1, OpenCL, MTLCompilerService never-end + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + return false; } diff --git a/src/modules/module_19200.c b/src/modules/module_19200.c index 988ae644a..3cd53e043 100644 --- a/src/modules/module_19200.c +++ b/src/modules/module_19200.c @@ -62,6 +62,12 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE { return true; } + + // AppleM1, OpenCL, MTLCompilerService, createKernel: newComputePipelineState failed (pure/optimized kernel) + if ((device_param->opencl_device_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } } return false; diff --git a/src/modules/module_21600.c b/src/modules/module_21600.c index 86469a7ce..926ef6438 100644 --- a/src/modules/module_21600.c +++ b/src/modules/module_21600.c @@ -55,6 +55,17 @@ typedef struct web2py_sha512_tmp } web2py_sha512_tmp_t; +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + // AppleM1, OpenCL, MTLCompilerService, createKernel: newComputePipelineState failed (pure/optimized kernel) + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } + + return false; +} + u64 module_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra) { const u64 tmp_size = (const u64) sizeof (web2py_sha512_tmp_t); @@ -228,6 +239,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = module_tmp_size; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_21800.c b/src/modules/module_21800.c index 3e8f8a2cf..5499d81ce 100644 --- a/src/modules/module_21800.c +++ b/src/modules/module_21800.c @@ -95,6 +95,12 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE { return true; } + + // AppleM1, OpenCL, MTLCompilerService never-end (pure/optimized kernel) + if ((device_param->opencl_device_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + return true; + } } // amdgpu-pro-20.50-1234664-ubuntu-20.04 (legacy) From 07240ada8bc79c425fa3cbb1604e4efbc88dd6c5 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Sat, 22 Jan 2022 23:08:18 +0100 Subject: [PATCH 2/8] Added support to building Universal macOS binary on Apple Silicon --- docs/changes.txt | 1 + src/Makefile | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 9d1a7b8b0..793bf8e40 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -16,6 +16,7 @@ - Added support to use --debug-mode in attack-mode 9 (Association Attack) - Added guess data to --status-json output - Added hex format for --separator option +- Added support to building Universal macOS binary on Apple Silicon ## ## Bugs diff --git a/src/Makefile b/src/Makefile index fc0afc4fb..4a5d419da 100644 --- a/src/Makefile +++ b/src/Makefile @@ -36,7 +36,7 @@ $(error "! Your Operating System ($(UNAME)) is not supported by this Makefile") endif ifeq ($(DEBUG),1) -$(warning "## Detected Operating System : $(UNAME)") +$(info "## Detected Operating System : $(UNAME)") endif ## @@ -76,6 +76,7 @@ AR := /usr/bin/ar SED := /usr/bin/sed SED_IN_PLACE := -i "" DARWIN_VERSION := $(shell uname -r | cut -d. -f1) +IS_APPLE_SILICON := $(shell lipo /bin/zsh -verify_arch arm64e && echo 1 || echo 0) endif ifneq (,$(filter $(UNAME),FreeBSD NetBSD)) @@ -333,6 +334,16 @@ LFLAGS_NATIVE := $(LFLAGS) LFLAGS_NATIVE += -framework IOKit LFLAGS_NATIVE += -lpthread LFLAGS_NATIVE += -liconv + +ifeq ($(IS_APPLE_SILICON),1) +CFLAGS_NATIVE += -arch arm64 +CFLAGS_NATIVE += -arch x86_64 +ifeq ($(SHARED),1) +LFLAGS_NATIVE += -arch arm64 +LFLAGS_NATIVE += -arch x86_64 +endif +endif + endif # Darwin ifeq ($(UNAME),CYGWIN) From 743c12b8589d26ed664bd93dbaf62f3b4f7d416c Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Sat, 22 Jan 2022 23:49:02 +0100 Subject: [PATCH 3/8] Updated credits --- docs/credits.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/credits.txt b/docs/credits.txt index 1d962206e..268719f2c 100644 --- a/docs/credits.txt +++ b/docs/credits.txt @@ -23,6 +23,7 @@ Gabriele "matrix" Gristina (@gm4tr1x) * OpenCL Info feature * Apple macOS port * Apple Silicon support +* Universal binary on Apple Silicon * Hardware monitor initial code base and maintenance * Test suite initial code base and maintenance * Makefile initial code base From 07a5cae4fd096f94033ffee62298a535e0a62219 Mon Sep 17 00:00:00 2001 From: Lorenzo Billi Date: Sun, 23 Jan 2022 18:34:49 +0100 Subject: [PATCH 4/8] Added Nvidia 16 series and latest 30s to hctune --- hashcat.hctune | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hashcat.hctune b/hashcat.hctune index cb8832879..47197cf09 100644 --- a/hashcat.hctune +++ b/hashcat.hctune @@ -260,6 +260,13 @@ GeForce_MX110 ALIAS_nv_sm50_or_higher GeForce_MX130 ALIAS_nv_sm50_or_higher GeForce_MX150 ALIAS_nv_sm50_or_higher +GeForce_GTX_1650 ALIAS_nv_sm50_or_higher +GeForce_GTX_1650_SUPER ALIAS_nv_sm50_or_higher +GeForce_GTX_1650_Ti ALIAS_nv_sm50_or_higher +GeForce_GTX_1660 ALIAS_nv_sm50_or_higher +GeForce_GTX_1660_SUPER ALIAS_nv_sm50_or_higher +GeForce_GTX_1660_Ti ALIAS_nv_sm50_or_higher + GeForce_RTX_2060 ALIAS_nv_sm50_or_higher GeForce_RTX_2060_SUPER ALIAS_nv_sm50_or_higher GeForce_RTX_2070 ALIAS_nv_sm50_or_higher @@ -268,12 +275,16 @@ GeForce_RTX_2080 ALIAS_nv_sm50_or_higher GeForce_RTX_2080_SUPER ALIAS_nv_sm50_or_higher GeForce_RTX_2080_Ti ALIAS_nv_sm50_or_higher +GeForce_RTX_3050 ALIAS_nv_sm50_or_higher +GeForce_RTX_3050_Ti ALIAS_nv_sm50_or_higher GeForce_RTX_3060 ALIAS_nv_sm50_or_higher GeForce_RTX_3060_Ti ALIAS_nv_sm50_or_higher GeForce_RTX_3070 ALIAS_nv_sm50_or_higher GeForce_RTX_3070_Ti ALIAS_nv_sm50_or_higher GeForce_RTX_3080 ALIAS_nv_sm50_or_higher +GeForce_RTX_3080_Ti ALIAS_nv_sm50_or_higher GeForce_RTX_3090 ALIAS_nv_sm50_or_higher +GeForce_RTX_3090_Ti ALIAS_nv_sm50_or_higher ## ## Unmapped GPU From 9066a714a09fa78dc99e76d13a997279f57cd999 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Mon, 24 Jan 2022 07:32:07 +0100 Subject: [PATCH 5/8] restore changes.txt and status_codes.txt --- docs/changes.txt | 8 -------- docs/status_codes.txt | 7 +++---- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 242f7f068..9d1a7b8b0 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -48,7 +48,6 @@ - Hash-Mode 7500: set native_threads to 32 with Apple GPU's - Hash-Mode 10500: set native_threads to 32 with Apple GPU's - Hash-Mode 13100: set native_threads to 32 with Apple GPU's -- Fixed bug on benchmark engine, avoid skipping all devices in case of "kernel create error" in one of them ## ## Technical @@ -72,13 +71,6 @@ - Unit tests: added -r (--runtime) option - Unit tests: handle negative status code, skip deprecated hash-types, skip hash-types with known perl modules issues, updated output - Hash Info: show more information (Updated Hash-Format. Added Autodetect, Self-Test, Potfile and Plaintext encoding) -- Status code: updated negative status code (added kernel create failure and resync) - -## -## Improvements -## - -- OpenCL Runtime: Add some unstable warnings detected on macOS * changes v6.2.4 -> v6.2.5 diff --git a/docs/status_codes.txt b/docs/status_codes.txt index c93a9e6b4..b7889ff2e 100644 --- a/docs/status_codes.txt +++ b/docs/status_codes.txt @@ -1,10 +1,9 @@ status codes on exit: ===================== --9 = mixed backend errors (combo of -3, -4, -5, -6, -7 errors type) --8 = backend error: Invalid module_extra_buffer_size --7 = backend error: Too many compute units to keep minimum kernel accel limit --6 = backend error: kernel create error +-8 = mixed backend errors (combo of -3, -4, -5, -6, -7 errors type) +-7 = backend error: Invalid module_extra_buffer_size +-6 = backend error: Too many compute units to keep minimum kernel accel limit -5 = backend error: main kernel build error -4 = backend error: memory hit -3 = backend error: skipping hash-type due to module_unstable_warning settings From e15df9dac925096840158c28d72103bbd6d978f5 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Mon, 24 Jan 2022 07:35:46 +0100 Subject: [PATCH 6/8] push back changes on changes.txt and status_codes.txt --- docs/changes.txt | 8 ++++++++ docs/status_codes.txt | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 93a4d9d6c..c6956abce 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -48,6 +48,7 @@ - Hash-Mode 7500: set native_threads to 32 with Apple GPU's - Hash-Mode 10500: set native_threads to 32 with Apple GPU's - Hash-Mode 13100: set native_threads to 32 with Apple GPU's +- Fixed bug on benchmark engine, avoid skipping all devices in case of "kernel create error" in one of them ## ## Technical @@ -72,6 +73,13 @@ - Unit tests: added -r (--runtime) option - Unit tests: handle negative status code, skip deprecated hash-types, skip hash-types with known perl modules issues, updated output - Hash Info: show more information (Updated Hash-Format. Added Autodetect, Self-Test, Potfile and Plaintext encoding) +- Status code: updated negative status code (added kernel create failure and resync) + +## +## Improvements +## + +- OpenCL Runtime: Add some unstable warnings detected on macOS * changes v6.2.4 -> v6.2.5 diff --git a/docs/status_codes.txt b/docs/status_codes.txt index 33f44d0a6..4b9daaf4e 100644 --- a/docs/status_codes.txt +++ b/docs/status_codes.txt @@ -2,9 +2,10 @@ status codes on exit: ===================== -10 = autotune failure - -8 = mixed backend errors (combo of -3, -4, -5, -6, -7 errors type) - -7 = backend error: Invalid module_extra_buffer_size - -6 = backend error: Too many compute units to keep minimum kernel accel limit + -9 = mixed backend errors (combo of -3, -4, -5, -6, -7 errors type) + -8 = backend error: Invalid module_extra_buffer_size + -7 = backend error: Too many compute units to keep minimum kernel accel limit + -6 = backend error: kernel create error -5 = backend error: main kernel build error -4 = backend error: memory hit -3 = backend error: skipping hash-type due to module_unstable_warning settings From c39829f231ba904e8c9a6137183b239165780f1b Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Tue, 25 Jan 2022 14:44:27 +0100 Subject: [PATCH 7/8] Cleaned up some changes.txt entries --- docs/changes.txt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 93a4d9d6c..f588a6f75 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -34,20 +34,6 @@ - Fixed Unit Test salt-max in case of optimized kernel, with hash-type 22 and 23 - Fixed Unit Test false negative if there are spaces in the filesystem path to hashcat - Fixed --hash-info example password output: force uppercase if OPTS_TYPE_PT_UPPER is set -- Hash-Mode 9700: set native_threads to 32 with Apple GPU's -- Hash-Mode 9710: set native_threads to 32 with Apple GPU's -- Hash-Mode 9720: set native_threads to 32 with Apple GPU's -- Hash-Mode 9800: set native_threads to 32 with Apple GPU's -- Hash-Mode 9810: set native_threads to 32 with Apple GPU's -- Hash-Mode 9820: set native_threads to 32 with Apple GPU's -- Hash-Mode 10400: set native_threads to 32 with Apple GPU's -- Hash-Mode 10410: set native_threads to 32 with Apple GPU's -- Hash-Mode 10420: set native_threads to 32 with Apple GPU's -- Hash-Mode 18200: set native_threads to 32 with Apple GPU's -- Hash-Mode 25400: set native_threads to 32 with Apple GPU's -- Hash-Mode 7500: set native_threads to 32 with Apple GPU's -- Hash-Mode 10500: set native_threads to 32 with Apple GPU's -- Hash-Mode 13100: set native_threads to 32 with Apple GPU's ## ## Technical @@ -62,6 +48,7 @@ - OpenCL Backend: added workaround to make optimized kernels work on Apple Silicon - OpenCL Runtime: Added support to use Apple Silicon compute devices - OpenCL Runtime: Set default device-type to GPU with Apple Silicon compute devices +- OpenCL Kernel: Set native_threads to 32 on Apple GPU's for various hash-modes - Unit tests: Updated test.sh to set default device-type to CPU with Apple Intel and added -f (--force) option - OpenCL Backend: moved functions to ext_OpenCL.c and includes to ext_OpenCL.h - HIP Backend: moved functions to ext_hip.c/ext_hiprtc.c and includes to ext_hip.h/ext_hiprtc.h From 86b4abde9a1d23bab9e0802d2d3dd72aaddcf6c6 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Fri, 28 Jan 2022 17:09:52 +0100 Subject: [PATCH 8/8] Fixed changes.txt ordering --- docs/changes.txt | 49 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 625fa9069..6736992b2 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -5,69 +5,64 @@ ## - Added hash-mode: Exodus Desktop Wallet (scrypt) +- Added hash-mode: PostgreSQL SCRAM-SHA-256 - Added hash-mode: Teamspeak 3 (channel hash) - Added hash-mode: sha256($salt.sha256_bin($pass)) -- Added hash-mode: PostgreSQL SCRAM-SHA-256 ## ## Features ## +- Added support to building Universal macOS binary on Apple Silicon - Added support to use --debug-mode in attack-mode 9 (Association Attack) - Added guess data to --status-json output - Added hex format for --separator option -- Added support to building Universal macOS binary on Apple Silicon ## ## Bugs ## +- Fixed bug on benchmark engine, avoid skipping all devices in case of "kernel create error" in one of them +- Fixed bug on benchmark engine, from now it will not stop at the first error detected +- Fixed false negative on Unit Test in case of out-of-memory with grep in single mode +- Fixed false negative on Unit Test with hash-type 25400 - Fixed functional error when nonce-error-corrections that were set on the command line in hash-mode 22000/22001 were not accepted - Fixed handling of password candidates that are shorter than the minimum password length in Association Attack +- Fixed --hash-info example password output: force uppercase if OPTS_TYPE_PT_UPPER is set - Fixed method of how OPTS_TYPE_AUX* kernels are called in an association attack, for example in WPA/WPA2 kernel - Fixed missing option flag OPTS_TYPE_SUGGEST_KG for hash-mode 11600 to inform the user about possible false positives in this mode - Fixed undefined function call to hc_byte_perm_S() in hash-mode 17010 on non-CUDA compute devices -- Fixed wordlist handling in -m 3000 when candidate passwords use the $HEX[...] syntax -- Fixed false negative on Unit Test with hash-type 25400 -- Fixed bug on benchmark engine, from now it will not stop at the first error detected -- Fixed false negative on Unit Test in case of out-of-memory with grep in single mode - Fixed Unit Test early exit on luks test file download/extract failure -- Fixed Unit Test salt-max in case of optimized kernel, with hash-type 22 and 23 - Fixed Unit Test false negative if there are spaces in the filesystem path to hashcat -- Fixed --hash-info example password output: force uppercase if OPTS_TYPE_PT_UPPER is set -- Fixed bug on benchmark engine, avoid skipping all devices in case of "kernel create error" in one of them +- Fixed Unit Test salt-max in case of optimized kernel, with hash-type 22 and 23 +- Fixed wordlist handling in -m 3000 when candidate passwords use the $HEX[...] syntax ## ## Technical ## - Association Attack: Enable module specific pw_min and pw_max settings to avoid false positives in -a 9 attack-mode +- Autotune: Added error handling. By default skipping device on error, with --force using accel/loops/threads min values instead - Backend Info: Added local memory size to output +- CUDA Backend: moved functions to ext_cuda.c/ext_nvrtc.c and includes to ext_cuda.h/ext_nvrtc.h +- Hash Info: show more information (Updated Hash-Format. Added Autodetect, Self-Test, Potfile and Plaintext encoding) +- HIP Backend: moved functions to ext_hip.c/ext_hiprtc.c and includes to ext_hip.h/ext_hiprtc.h - Kernels: Refactored standard kernel declaration to use a structure holding u32/u64 attributes to reduce the number of attributes -- Tuning Database: Added a warning if a module implements module_extra_tuningdb_block but the installed computing device is not found -- Usage Screen: On windows console, wait for any keypress if usage_mini_print() is used -- User Options: Add new module function module_hash_decode_postprocess() to override hash specific configurations from command line +- Makefile: updated MACOSX_DEPLOYMENT_TARGET to 10.15 and removed OpenCL framework from LFLAGS_NATIVE on MacOS - OpenCL Backend: added workaround to make optimized kernels work on Apple Silicon +- OpenCL Backend: moved functions to ext_OpenCL.c and includes to ext_OpenCL.h +- OpenCL Kernel: Set native_threads to 32 on Apple GPU's for various hash-modes +- OpenCL Runtime: Add some unstable warnings detected on macOS - OpenCL Runtime: Added support to use Apple Silicon compute devices - OpenCL Runtime: Set default device-type to GPU with Apple Silicon compute devices -- OpenCL Kernel: Set native_threads to 32 on Apple GPU's for various hash-modes -- Unit tests: Updated test.sh to set default device-type to CPU with Apple Intel and added -f (--force) option -- OpenCL Backend: moved functions to ext_OpenCL.c and includes to ext_OpenCL.h -- HIP Backend: moved functions to ext_hip.c/ext_hiprtc.c and includes to ext_hip.h/ext_hiprtc.h -- CUDA Backend: moved functions to ext_cuda.c/ext_nvrtc.c and includes to ext_cuda.h/ext_nvrtc.h -- Autotune: Added error handling. By default skipping device on error, with --force using accel/loops/threads min values instead -- Makefile: updated MACOSX_DEPLOYMENT_TARGET to 10.15 and removed OpenCL framework from LFLAGS_NATIVE on MacOS +- Status code: updated negative status code (added kernel create failure and resync) - Status code: updated negative status code, usefull in Unit tests engine (test.sh) +- Tuning Database: Added a warning if a module implements module_extra_tuningdb_block but the installed computing device is not found - Unit tests: added -r (--runtime) option - Unit tests: handle negative status code, skip deprecated hash-types, skip hash-types with known perl modules issues, updated output -- Hash Info: show more information (Updated Hash-Format. Added Autodetect, Self-Test, Potfile and Plaintext encoding) -- Status code: updated negative status code (added kernel create failure and resync) - -## -## Improvements -## - -- OpenCL Runtime: Add some unstable warnings detected on macOS +- Unit tests: Updated test.sh to set default device-type to CPU with Apple Intel and added -f (--force) option +- Usage Screen: On windows console, wait for any keypress if usage_mini_print() is used +- User Options: Add new module function module_hash_decode_postprocess() to override hash specific configurations from command line * changes v6.2.4 -> v6.2.5