Support mixed kernel thread count for mixed kernels in the same source file

Get rid of one global kernel_threads variable
Recognize reqd_work_group_size() values from OpenCL kernels and use them in host if possible
Fix some white spaces
Remove unused weak* kernels
Rename hashconfig_enforce_kernel_threads() to hashconfig_get_kernel_threads() - we do not enforce anymore
Rename hashconfig_enforce_kernel_loops() to hashconfig_get_kernel_loops() - we do not enforce anymore
Add some missing checks for --quiet
This commit is contained in:
jsteube
2016-10-29 14:02:29 +02:00
parent 86d62e418e
commit df8a9ab5e5
5 changed files with 240 additions and 143 deletions

View File

@@ -37,23 +37,23 @@ typedef struct pdf
int enc_md;
u32 id_buf[8];
u32 u_buf[32];
u32 o_buf[32];
u32 id_buf[8];
u32 u_buf[32];
u32 o_buf[32];
int id_len;
int o_len;
int u_len;
u32 rc4key[2];
u32 rc4data[2];
u32 rc4key[2];
u32 rc4data[2];
} pdf_t;
typedef struct wpa
{
u32 pke[25];
u32 eapol[64];
u32 pke[25];
u32 eapol[64];
int eapol_size;
int keyver;
u8 orig_mac1[6];
@@ -1509,12 +1509,12 @@ void to_hccap_t (hashcat_ctx_t *hashcat_ctx, hccap_t *hccap, const u32 salt_pos,
int ascii_digest (hashcat_ctx_t *hashcat_ctx, char *out_buf, const u32 salt_pos, const u32 digest_pos);
int hashconfig_init (hashcat_ctx_t *hashcat_ctx);
void hashconfig_destroy (hashcat_ctx_t *hashcat_ctx);
u32 hashconfig_enforce_kernel_threads (hashcat_ctx_t *hashcat_ctx, const hc_device_param_t *device_param);
u32 hashconfig_enforce_kernel_loops (hashcat_ctx_t *hashcat_ctx);
int hashconfig_general_defaults (hashcat_ctx_t *hashcat_ctx);
void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, void *esalt);
char *hashconfig_benchmark_mask (hashcat_ctx_t *hashcat_ctx);
int hashconfig_init (hashcat_ctx_t *hashcat_ctx);
void hashconfig_destroy (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);
void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, void *esalt);
char *hashconfig_benchmark_mask (hashcat_ctx_t *hashcat_ctx);
#endif // _INTERFACE_H

View File

@@ -663,8 +663,8 @@ typedef struct wordr
typedef struct hc_device_param
{
cl_device_id device;
cl_device_type device_type;
cl_device_id device;
cl_device_type device_type;
u32 device_id;
u32 platform_devices_id; // for mapping with hms devices
@@ -683,7 +683,20 @@ typedef struct hc_device_param
u32 vector_width;
u32 kernel_threads;
u32 kernel_threads_by_user;
u32 kernel_threads_by_wgs_kernel1;
u32 kernel_threads_by_wgs_kernel12;
u32 kernel_threads_by_wgs_kernel2;
u32 kernel_threads_by_wgs_kernel23;
u32 kernel_threads_by_wgs_kernel3;
u32 kernel_threads_by_wgs_kernel_mp;
u32 kernel_threads_by_wgs_kernel_mp_l;
u32 kernel_threads_by_wgs_kernel_mp_r;
u32 kernel_threads_by_wgs_kernel_amp;
u32 kernel_threads_by_wgs_kernel_tm;
u32 kernel_threads_by_wgs_kernel_memset;
u32 kernel_loops;
u32 kernel_accel;
u32 kernel_loops_min;
@@ -770,7 +783,6 @@ typedef struct hc_device_param
cl_kernel kernel_mp_r;
cl_kernel kernel_amp;
cl_kernel kernel_tm;
cl_kernel kernel_weak;
cl_kernel kernel_memset;
cl_context context;