From 2809c6f3fb756cb71272ec3fa791ee1ba2bee572 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sun, 10 Mar 2019 17:39:33 +0100 Subject: [PATCH] Some module specific trap 6 markers --- src/modules/module_01460.c | 19 ++++++++++++++++++- src/modules/module_08200.c | 7 ++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/modules/module_01460.c b/src/modules/module_01460.c index ae6765e75..0ab038d80 100644 --- a/src/modules/module_01460.c +++ b/src/modules/module_01460.c @@ -44,6 +44,23 @@ 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) +{ + if (device_param->platform_vendor_id == VENDOR_ID_APPLE) + { + // trap 6 + if ((device_param->device_vendor_id == VENDOR_ID_INTEL_SDK) && (device_param->device_type & CL_DEVICE_TYPE_GPU)) + { + 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; @@ -218,6 +235,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_08200.c b/src/modules/module_08200.c index 3019cf9e6..037a5ce27 100644 --- a/src/modules/module_08200.c +++ b/src/modules/module_08200.c @@ -96,13 +96,10 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY 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) { + // trap 6 if (device_param->platform_vendor_id == VENDOR_ID_APPLE) { - // trap 6 - if ((device_param->device_vendor_id == VENDOR_ID_INTEL_SDK) && (device_param->device_type & CL_DEVICE_TYPE_GPU)) - { - return true; - } + return true; } return false;