Support module specific JiT compiler build options

This commit is contained in:
jsteube
2019-03-02 11:12:13 +01:00
parent a5743c5572
commit 88a051629c
278 changed files with 708 additions and 121 deletions
-1
View File
@@ -55,7 +55,6 @@ u32 default_salt_min (MAYBE_UNUSED const hashconfig_t *ha
u32 default_salt_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
char default_separator (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_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);
bool default_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);
bool default_warmup_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
#endif // _INTERFACE_H
+3 -1
View File
@@ -48,7 +48,6 @@ char module_separator (MAYBE_UNUSED const hashconfig_t *ha
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);
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);
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);
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);
bool module_warmup_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra);
int module_hash_binary_count (MAYBE_UNUSED const hashes_t *hashes);
@@ -65,6 +64,7 @@ u64 module_kern_type_dynamic (MAYBE_UNUSED const hashconfig_t *ha
u64 module_extra_buffer_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, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param);
u64 module_extra_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, MAYBE_UNUSED const hashes_t *hashes);
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);
bool module_jit_cache_disable (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);
u32 module_deep_comp_kernel (MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const u32 salt_pos, MAYBE_UNUSED const u32 digest_pos);
int module_hash_init_selftest (MAYBE_UNUSED const hashconfig_t *hashconfig, hash_t *hash);
@@ -73,4 +73,6 @@ void module_hook23 (hc_device_param_t *device_param, co
int module_build_plain_postprocess (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const hashes_t *hashes, const u32 *src_buf, MAYBE_UNUSED const size_t src_sz, const int src_len, u32 *dst_buf, MAYBE_UNUSED const size_t dst_sz);
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);
#endif // _MODULES_H
+3 -3
View File
@@ -962,7 +962,6 @@ struct hashconfig
bool dictstat_disable;
bool hlfmt_disable;
bool warmup_disable;
bool unstable_warning;
bool outfile_check_disable;
bool outfile_check_nocomp;
bool potfile_disable;
@@ -1052,7 +1051,6 @@ typedef struct hc_device_param
u32 platform_devices_id; // for mapping with hms devices
bool skipped;
bool unstable_warning;
st_status_t st_status;
@@ -2310,7 +2308,6 @@ typedef struct module_ctx
const char *(*module_st_hash) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
const char *(*module_st_pass) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
u64 (*module_tmp_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
bool (*module_unstable_warning) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
bool (*module_warmup_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *);
int (*module_hash_binary_count) (const hashes_t *);
@@ -2327,6 +2324,7 @@ typedef struct module_ctx
u64 (*module_extra_buffer_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, const hashes_t *, const hc_device_param_t *);
u64 (*module_extra_tmp_size) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, const hashes_t *);
char *(*module_jit_build_options) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, const hashes_t *, const hc_device_param_t *);
bool (*module_jit_cache_disable) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, const hashes_t *, const hc_device_param_t *);
u32 (*module_deep_comp_kernel) (const hashes_t *, const u32, const u32);
int (*module_hash_init_selftest) (const hashconfig_t *, hash_t *);
@@ -2335,6 +2333,8 @@ typedef struct module_ctx
int (*module_build_plain_postprocess) (const hashconfig_t *, const hashes_t *, const u32 *, const size_t, const int, u32 *, const size_t);
bool (*module_unstable_warning) (const hashconfig_t *, const user_options_t *, const user_options_extra_t *, const hc_device_param_t *);
} module_ctx_t;
typedef struct hashcat_ctx