mirror of
https://github.com/hashcat/hashcat.git
synced 2025-05-29 20:28:47 +00:00
Remove hashconfig_forced_kernel_threads()
This commit is contained in:
parent
6e794841e3
commit
af22a9d1d9
@ -1713,7 +1713,7 @@ bool initialize_keyboard_layout_mapping (hashcat_ctx_t *hashcat_ctx, const char
|
||||
|
||||
int hashconfig_init (hashcat_ctx_t *hashcat_ctx);
|
||||
void hashconfig_destroy (hashcat_ctx_t *hashcat_ctx);
|
||||
u32 hashconfig_forced_kernel_threads (hashcat_ctx_t *hashcat_ctx);
|
||||
//u32 hashconfig_forced_kernel_threads (hashcat_ctx_t *hashcat_ctx);
|
||||
u32 hashconfig_get_kernel_threads (hashcat_ctx_t *hashcat_ctx, const hc_device_param_t *device_param);
|
||||
u32 hashconfig_get_kernel_loops (hashcat_ctx_t *hashcat_ctx);
|
||||
int hashconfig_general_defaults (hashcat_ctx_t *hashcat_ctx);
|
||||
@ -1730,6 +1730,7 @@ u32 default_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashco
|
||||
u32 default_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||
u32 default_dgst_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);
|
||||
u64 default_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);
|
||||
u32 default_forced_kernel_threads (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 char *default_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||
u32 default_hash_mode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||
u32 default_hash_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||
|
@ -13,6 +13,7 @@ u32 module_dgst_pos2 (MAYBE_UNUSED const hashconfig_t *hashcon
|
||||
u32 module_dgst_pos3 (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||
u32 module_dgst_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);
|
||||
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);
|
||||
u32 module_forced_kernel_threads (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 char *module_hash_name (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||
u32 module_hash_mode (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||
u32 module_hash_type (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
|
||||
|
@ -937,6 +937,8 @@ struct hashconfig
|
||||
salt_t *benchmark_salt;
|
||||
void *benchmark_esalt;
|
||||
void *benchmark_hook_salt;
|
||||
|
||||
u32 forced_kernel_threads;
|
||||
};
|
||||
|
||||
typedef struct hashconfig hashconfig_t;
|
||||
@ -2219,6 +2221,7 @@ typedef struct module_ctx
|
||||
u32 (*module_dgst_pos3) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_dgst_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u64 (*module_esalt_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_forced_kernel_threads) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
const char *(*module_hash_name) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_hash_mode) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
u32 (*module_hash_type) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
|
||||
|
@ -123,6 +123,7 @@ void module_register (module_ctx_t *module_ctx)
|
||||
module_ctx->module_dgst_pos3 = module_dgst_pos3;
|
||||
module_ctx->module_dgst_size = module_dgst_size;
|
||||
module_ctx->module_esalt_size = NULL;
|
||||
module_ctx->module_forced_kernel_threads = NULL;
|
||||
module_ctx->module_hash_decode = module_hash_decode;
|
||||
module_ctx->module_hash_encode = module_hash_encode;
|
||||
module_ctx->module_hash_mode = NULL;
|
||||
|
@ -23611,6 +23611,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
|
||||
hashconfig->dgst_pos3 = default_dgst_pos3 (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->dgst_size = default_dgst_size (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->esalt_size = default_esalt_size (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->forced_kernel_threads = default_forced_kernel_threads (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->hash_name = default_hash_name (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->hash_mode = default_hash_mode (hashconfig, user_options, user_options_extra);
|
||||
hashconfig->hash_type = default_hash_type (hashconfig, user_options, user_options_extra);
|
||||
@ -23647,6 +23648,7 @@ int hashconfig_init (hashcat_ctx_t *hashcat_ctx)
|
||||
if (module_ctx->module_dgst_pos3) hashconfig->dgst_pos3 = module_ctx->module_dgst_pos3 (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_dgst_size) hashconfig->dgst_size = module_ctx->module_dgst_size (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_esalt_size) hashconfig->esalt_size = module_ctx->module_esalt_size (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_forced_kernel_threads) hashconfig->forced_kernel_threads = module_ctx->module_forced_kernel_threads (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_hash_name) hashconfig->hash_name = module_ctx->module_hash_name (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_hash_mode) hashconfig->hash_mode = module_ctx->module_hash_mode (hashconfig, user_options, user_options_extra);
|
||||
if (module_ctx->module_hash_type) hashconfig->hash_type = module_ctx->module_hash_type (hashconfig, user_options, user_options_extra);
|
||||
@ -29285,6 +29287,7 @@ void hashconfig_destroy (hashcat_ctx_t *hashcat_ctx)
|
||||
memset (hashconfig, 0, sizeof (hashconfig_t));
|
||||
}
|
||||
|
||||
/*
|
||||
u32 hashconfig_forced_kernel_threads (hashcat_ctx_t *hashcat_ctx)
|
||||
{
|
||||
const hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
|
||||
@ -29314,6 +29317,7 @@ u32 hashconfig_forced_kernel_threads (hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
return kernel_threads;
|
||||
}
|
||||
*/
|
||||
|
||||
u32 hashconfig_get_kernel_threads (hashcat_ctx_t *hashcat_ctx, const hc_device_param_t *device_param)
|
||||
{
|
||||
@ -29321,7 +29325,7 @@ u32 hashconfig_get_kernel_threads (hashcat_ctx_t *hashcat_ctx, const hc_device_p
|
||||
|
||||
// a kernel can force a fixed value
|
||||
|
||||
const u32 forced_kernel_threads = hashconfig_forced_kernel_threads (hashcat_ctx);
|
||||
const u32 forced_kernel_threads = hashconfig->forced_kernel_threads;
|
||||
|
||||
if (forced_kernel_threads) return forced_kernel_threads;
|
||||
|
||||
@ -30879,6 +30883,13 @@ u64 default_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSE
|
||||
return esalt_size;
|
||||
}
|
||||
|
||||
u32 default_forced_kernel_threads (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 u32 forced_kernel_threads = user_options->kernel_threads;
|
||||
|
||||
return forced_kernel_threads;
|
||||
}
|
||||
|
||||
u32 default_salt_type (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 u32 salt_type = SALT_TYPE_NONE;
|
||||
|
@ -4712,7 +4712,7 @@ int opencl_session_begin (hashcat_ctx_t *hashcat_ctx)
|
||||
tmto_stop = user_options->scrypt_tmto;
|
||||
}
|
||||
|
||||
const u32 scrypt_threads = hashconfig_forced_kernel_threads (hashcat_ctx);
|
||||
const u32 scrypt_threads = hashconfig->forced_kernel_threads;
|
||||
|
||||
const u64 kernel_power_max = SCRYPT_MAX_ACCEL * device_processors * scrypt_threads;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user