diff --git a/OpenCL/inc_types.cl b/OpenCL/inc_types.cl index 591627eb8..752acd63c 100644 --- a/OpenCL/inc_types.cl +++ b/OpenCL/inc_types.cl @@ -1318,7 +1318,7 @@ typedef struct typedef struct { - u32 cmds[0x100]; + u32 cmds[32]; } kernel_rule_t; diff --git a/docs/changes.txt b/docs/changes.txt index 4ce4072bf..d828a6045 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -11,6 +11,7 @@ - Added docs/credits.txt - Added docs/team.txt - Allow words of length > 32 in wordlists for -a 0 for slow hashes if no rules are in use or a : rule is in the rulefile +- Reduce max. number of allowed function calls per rule from 256 to 32 to save GPU memory ## ## Algorithms diff --git a/include/types.h b/include/types.h index a289c0a3c..826f3b8fc 100644 --- a/include/types.h +++ b/include/types.h @@ -680,13 +680,13 @@ typedef struct { u32 len; - char buf[0x100]; + char buf[32]; } cpu_rule_t; typedef struct { - u32 cmds[0x100]; + u32 cmds[32]; } kernel_rule_t; @@ -1034,7 +1034,7 @@ typedef struct } hc_global_data_t; -#define RULES_MAX 256 +#define RULES_MAX 32 #define PW_DICTMAX 31 #define PW_DICTMAX1 (PW_DICTMAX + 1) diff --git a/src/rp_cpu.c b/src/rp_cpu.c index be1466ccd..335de121f 100644 --- a/src/rp_cpu.c +++ b/src/rp_cpu.c @@ -172,7 +172,7 @@ static int conv_itoc (const u8 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_KERNEL_RULES 255 +#define MAX_KERNEL_RULES 31 #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)