diff --git a/src/modules/module_06100.c b/src/modules/module_06100.c index 03d0c582b..62415f62d 100644 --- a/src/modules/module_06100.c +++ b/src/modules/module_06100.c @@ -41,6 +41,20 @@ 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) +{ + // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES + if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) + { + if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) + { + return true; + } + } + + return false; +} + int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -229,6 +243,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_07400.c b/src/modules/module_07400.c index 9cb1741eb..e914d251d 100644 --- a/src/modules/module_07400.c +++ b/src/modules/module_07400.c @@ -260,7 +260,7 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE // amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) { - if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) + if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 1) { return true; } diff --git a/src/modules/module_07500.c b/src/modules/module_07500.c index c0a517c9a..4593486bf 100644 --- a/src/modules/module_07500.c +++ b/src/modules/module_07500.c @@ -76,6 +76,20 @@ u32 module_kernel_threads_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB return kernel_threads_max; } +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) +{ + // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES + if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) + { + if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) + { + return true; + } + } + + return false; +} + int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -290,6 +304,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_08600.c b/src/modules/module_08600.c index f84156d6c..59c889986 100644 --- a/src/modules/module_08600.c +++ b/src/modules/module_08600.c @@ -50,6 +50,17 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con return pw_max; } +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) +{ + // amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed + if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) + { + return true; + } + + return false; +} + int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -158,6 +169,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 361fedc4a..bad9e5197 100644 --- a/src/modules/module_11750.c +++ b/src/modules/module_11750.c @@ -46,10 +46,7 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) { - if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 1) - { - return true; - } + return true; } return false; diff --git a/src/modules/module_11760.c b/src/modules/module_11760.c index 591f60144..c47078236 100644 --- a/src/modules/module_11760.c +++ b/src/modules/module_11760.c @@ -46,10 +46,7 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) { - if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 1) - { - return true; - } + return true; } return false; diff --git a/src/modules/module_11850.c b/src/modules/module_11850.c index d9f216123..c7b2683d6 100644 --- a/src/modules/module_11850.c +++ b/src/modules/module_11850.c @@ -46,10 +46,7 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) { - if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 1) - { - return true; - } + return true; } return false; diff --git a/src/modules/module_11860.c b/src/modules/module_11860.c index bc42dd7c0..eae974f55 100644 --- a/src/modules/module_11860.c +++ b/src/modules/module_11860.c @@ -46,10 +46,7 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) { - if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 1) - { - return true; - } + return true; } return false; diff --git a/src/modules/module_13100.c b/src/modules/module_13100.c index 3f1ee81e7..f965d4046 100644 --- a/src/modules/module_13100.c +++ b/src/modules/module_13100.c @@ -73,6 +73,20 @@ u32 module_kernel_threads_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB return kernel_threads_max; } +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) +{ + // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES + if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) + { + if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) + { + return true; + } + } + + return false; +} + int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -297,6 +311,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_18200.c b/src/modules/module_18200.c index 1d6a8718f..9fa330a23 100644 --- a/src/modules/module_18200.c +++ b/src/modules/module_18200.c @@ -75,6 +75,20 @@ u32 module_kernel_threads_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB return kernel_threads_max; } +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) +{ + // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES + if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) + { + if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) + { + return true; + } + } + + return false; +} + int module_hash_decode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED void *digest_buf, MAYBE_UNUSED salt_t *salt, MAYBE_UNUSED void *esalt_buf, MAYBE_UNUSED void *hook_salt_buf, MAYBE_UNUSED hashinfo_t *hash_info, const char *line_buf, MAYBE_UNUSED const int line_len) { u32 *digest = (u32 *) digest_buf; @@ -261,6 +275,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/opencl.c b/src/opencl.c index 7d9d5616b..c58a2cbfb 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -6750,8 +6750,10 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx) EVENT_DATA (EVENT_OPENCL_DEVICE_INIT_POST, &device_id, sizeof (u32)); } - // Prevent exit from benchmark mode if all devices are skipped due to unstable hash-modes (macOS) - // if (hardware_power_all == 0) return -1; + if (user_options->benchmark == false) + { + if (hardware_power_all == 0) return -1; + } opencl_ctx->hardware_power_all = hardware_power_all;