From 0428514f615d4384897a4040f50406d8d530ead5 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sun, 3 Jan 2016 19:49:47 +0100 Subject: [PATCH] Extended support from 14 to 255 functions calls per rule on GPU --- OpenCL/types_ocl.c | 13 ++----------- docs/changes.txt | 15 ++++++++++++--- include/types.h | 4 ++-- src/shared.c | 2 +- tools/rules_test/cpu_rules.c | 2 +- tools/rules_test/cpu_rules.h | 3 ++- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/OpenCL/types_ocl.c b/OpenCL/types_ocl.c index f584ad3d7..af671fcf8 100644 --- a/OpenCL/types_ocl.c +++ b/OpenCL/types_ocl.c @@ -1009,7 +1009,7 @@ typedef struct typedef struct { - u32 key; + u32 key; u64 val; } hcstat_table_t; @@ -1023,19 +1023,10 @@ typedef struct typedef struct { - u32 cmds[15]; + u32 cmds[0x100]; } gpu_rule_t; -/* -typedef struct -{ - u32 plain_buf[16]; - u32 plailen; - -} plain_t; -*/ - typedef struct { u32 gidvid; diff --git a/docs/changes.txt b/docs/changes.txt index 9643c4e13..4355a6945 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -5,29 +5,38 @@ File.: Kernel Desc.: Dropped CUDA support and switched to OpenCL for NVidia Type.: Feature -File.: Host -Desc.: Implemented a new feature that allows to quit at next restore point update (and disable it) -Issue: 10 +File.: Kernel +Desc.: Extended support from 14 to 255 functions calls per rule on GPU Type.: Feature File.: Host Desc.: Added a Makefile target for native compilation +Issue: 2 Type.: Feature File.: Host Desc.: Switched to Khronos OSS OpenCL reference implementation for building +Issue: 2 Type.: Feature File.: Host Desc.: No longer need NVidia-CUDA-SDK, AMD-APP-SDK and NVidia-ForceWare driver in depencies +Issue: 2 Type.: Feature File.: Host Desc.: Added option --gpu-platform to select a single OpenCL platform in case multiple OpenCL platforms are present +Issue: 2 + +Type.: Feature +File.: Host +Desc.: Implemented a new feature that allows to quit at next restore point update (and disable it) +Issue: 10 Type.: Feature File.: Host Desc.: Moved rules_optimize to hashcat-utils +Issue: 2 Type.: Bug File.: Host diff --git a/include/types.h b/include/types.h index 47875436f..2bd32f3ce 100644 --- a/include/types.h +++ b/include/types.h @@ -669,7 +669,7 @@ typedef struct typedef struct { - uint cmds[15]; + uint cmds[0x100]; } gpu_rule_t; @@ -803,7 +803,7 @@ typedef struct } wordr_t; -#define RULES_MAX 16 +#define RULES_MAX 256 #define PW_MIN 0 #define PW_MAX 54 #define PW_MAX1 (PW_MAX + 1) diff --git a/src/shared.c b/src/shared.c index 7e65de3a9..b499637b5 100644 --- a/src/shared.c +++ b/src/shared.c @@ -18857,7 +18857,7 @@ char conv_itoc (char c) #define SET_NAME(rule,val) (rule)->cmds[rule_cnt] = ((val) & 0xff) << 0 #define SET_P0(rule,val) INCR_POS; (rule)->cmds[rule_cnt] |= ((val) & 0xff) << 8 #define SET_P1(rule,val) INCR_POS; (rule)->cmds[rule_cnt] |= ((val) & 0xff) << 16 -#define MAX_GPU_RULES 14 +#define MAX_GPU_RULES 255 #define GET_NAME(rule) rule_cmd = (((rule)->cmds[rule_cnt] >> 0) & 0xff) #define GET_P0(rule) INCR_POS; rule_buf[rule_pos] = (((rule)->cmds[rule_cnt] >> 8) & 0xff) #define GET_P1(rule) INCR_POS; rule_buf[rule_pos] = (((rule)->cmds[rule_cnt] >> 16) & 0xff) diff --git a/tools/rules_test/cpu_rules.c b/tools/rules_test/cpu_rules.c index 2b9adfe10..efd399d74 100644 --- a/tools/rules_test/cpu_rules.c +++ b/tools/rules_test/cpu_rules.c @@ -15,7 +15,7 @@ extern int max_len; #define SET_NAME(rule,val) (rule)->cmds[rule_cnt] = ((val) & 0xff) << 0 #define SET_P0(rule,val) INCR_POS; (rule)->cmds[rule_cnt] |= ((val) & 0xff) << 8 #define SET_P1(rule,val) INCR_POS; (rule)->cmds[rule_cnt] |= ((val) & 0xff) << 16 -#define MAX_GPU_RULES 14 +#define MAX_GPU_RULES 255 #define GET_NAME(rule) rule_cmd = (((rule)->cmds[rule_cnt] >> 0) & 0xff) #define GET_P0(rule) INCR_POS; rule_buf[rule_pos] = (((rule)->cmds[rule_cnt] >> 8) & 0xff) #define GET_P1(rule) INCR_POS; rule_buf[rule_pos] = (((rule)->cmds[rule_cnt] >> 16) & 0xff) diff --git a/tools/rules_test/cpu_rules.h b/tools/rules_test/cpu_rules.h index d6ebd831c..593e60e81 100644 --- a/tools/rules_test/cpu_rules.h +++ b/tools/rules_test/cpu_rules.h @@ -11,6 +11,7 @@ #include #include #include "rp_cpu.h" + #define BLOCK_SIZE 64 #define RULE_RC_REJECT_ERROR -2 #define RP_RULE_BUFSIZ 0x100 @@ -20,7 +21,7 @@ typedef unsigned int uint; typedef struct { - uint cmds[15]; + uint cmds[256]; } gpu_rule_t;