Add missing backports from code base v6.2.2

Fix context to thread management
Fix missing code in selftest.c, autotune.c, hashes.c, dispatch.c and backend.c
Use IS_HIP depending code makes it easier for future optimization related to inline assembly calls - instead of using IS_CUDA || IS_HIP
See TODO markers for more optimizations / next steps
This commit is contained in:
Jens Steube
2021-07-11 12:38:59 +02:00
parent 5fd51268ca
commit 1b84a9e53b
15 changed files with 4485 additions and 277 deletions
+66 -67
View File
@@ -22,21 +22,21 @@ static const char CL_VENDOR_MESA[] = "Mesa";
static const char CL_VENDOR_NV[] = "NVIDIA Corporation";
static const char CL_VENDOR_POCL[] = "The pocl project";
int cuda_init (hashcat_ctx_t *hashcat_ctx);
void cuda_close (hashcat_ctx_t *hashcat_ctx);
int cuda_init (hashcat_ctx_t *hashcat_ctx);
void cuda_close (hashcat_ctx_t *hashcat_ctx);
int nvrtc_init (hashcat_ctx_t *hashcat_ctx);
void nvrtc_close (hashcat_ctx_t *hashcat_ctx);
int hip_init (hashcat_ctx_t *hashcat_ctx);
void hip_close (hashcat_ctx_t *hashcat_ctx);
int hip_init (hashcat_ctx_t *hashcat_ctx);
void hip_close (hashcat_ctx_t *hashcat_ctx);
int ocl_init (hashcat_ctx_t *hashcat_ctx);
void ocl_close (hashcat_ctx_t *hashcat_ctx);
int nvrtc_init (hashcat_ctx_t *hashcat_ctx);
void nvrtc_close (hashcat_ctx_t *hashcat_ctx);
int hiprtc_init (hashcat_ctx_t *hashcat_ctx);
void hiprtc_close (hashcat_ctx_t *hashcat_ctx);
int ocl_init (hashcat_ctx_t *hashcat_ctx);
void ocl_close (hashcat_ctx_t *hashcat_ctx);
int hc_nvrtcCreateProgram (hashcat_ctx_t *hashcat_ctx, nvrtcProgram *prog, const char *src, const char *name, int numHeaders, const char * const *headers, const char * const *includeNames);
int hc_nvrtcDestroyProgram (hashcat_ctx_t *hashcat_ctx, nvrtcProgram *prog);
int hc_nvrtcCompileProgram (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, int numOptions, const char * const *options);
@@ -85,55 +85,53 @@ int hc_cuLinkAddData (hashcat_ctx_t *hashcat_ctx, CUlinkState state,
int hc_cuLinkDestroy (hashcat_ctx_t *hashcat_ctx, CUlinkState state);
int hc_cuLinkComplete (hashcat_ctx_t *hashcat_ctx, CUlinkState state, void **cubinOut, size_t *sizeOut);
int hc_nvrtcCreateProgram (hashcat_ctx_t *hashcat_ctx, nvrtcProgram *prog, const char *src, const char *name, int numHeaders, const char * const *headers, const char * const *includeNames);
int hc_nvrtcDestroyProgram (hashcat_ctx_t *hashcat_ctx, nvrtcProgram *prog);
int hc_nvrtcCompileProgram (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, int numOptions, const char * const *options);
int hc_nvrtcGetProgramLogSize (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, size_t *logSizeRet);
int hc_nvrtcGetProgramLog (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, char *log);
int hc_nvrtcGetPTXSize (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, size_t *ptxSizeRet);
int hc_nvrtcGetPTX (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, char *ptx);
int hc_nvrtcVersion (hashcat_ctx_t *hashcat_ctx, int *major, int *minor);
int hc_hiprtcCreateProgram (hashcat_ctx_t *hashcat_ctx, hiprtcProgram *prog, const char *src, const char *name, int numHeaders, const char * const *headers, const char * const *includeNames);
int hc_hiprtcDestroyProgram (hashcat_ctx_t *hashcat_ctx, hiprtcProgram *prog);
int hc_hiprtcCompileProgram (hashcat_ctx_t *hashcat_ctx, hiprtcProgram prog, int numOptions, const char * const *options);
int hc_hiprtcGetProgramLogSize (hashcat_ctx_t *hashcat_ctx, hiprtcProgram prog, size_t *logSizeRet);
int hc_hiprtcGetProgramLog (hashcat_ctx_t *hashcat_ctx, hiprtcProgram prog, char *log);
int hc_hiprtcGetCodeSize (hashcat_ctx_t *hashcat_ctx, hiprtcProgram prog, size_t *ptxSizeRet);
int hc_hiprtcGetCode (hashcat_ctx_t *hashcat_ctx, hiprtcProgram prog, char *ptx);
int hc_hiprtcVersion (hashcat_ctx_t *hashcat_ctx, int *major, int *minor);
int hc_hipCtxCreate (hashcat_ctx_t *hashcat_ctx, HIPcontext *pctx, unsigned int flags, HIPdevice dev);
int hc_hipCtxDestroy (hashcat_ctx_t *hashcat_ctx, HIPcontext ctx);
int hc_hipCtxSetCurrent (hashcat_ctx_t *hashcat_ctx, HIPcontext ctx);
int hc_hipCtxSetCacheConfig (hashcat_ctx_t *hashcat_ctx, HIPfunc_cache config);
int hc_hipCtxSynchronize (hashcat_ctx_t *hashcat_ctx);
int hc_hipDeviceGetAttribute (hashcat_ctx_t *hashcat_ctx, int *pi, HIPdevice_attribute attrib, HIPdevice dev);
int hc_hipDeviceGetCount (hashcat_ctx_t *hashcat_ctx, int *count);
int hc_hipDeviceGet (hashcat_ctx_t *hashcat_ctx, HIPdevice *device, int ordinal);
int hc_hipDeviceGetName (hashcat_ctx_t *hashcat_ctx, char *name, int len, HIPdevice dev);
int hc_hipDeviceTotalMem (hashcat_ctx_t *hashcat_ctx, size_t *bytes, HIPdevice dev);
int hc_hipDriverGetVersion (hashcat_ctx_t *hashcat_ctx, int *driverVersion);
int hc_hipEventCreate (hashcat_ctx_t *hashcat_ctx, HIPevent *phEvent, unsigned int Flags);
int hc_hipEventDestroy (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent);
int hc_hipEventElapsedTime (hashcat_ctx_t *hashcat_ctx, float *pMilliseconds, HIPevent hStart, HIPevent hEnd);
int hc_hipEventQuery (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent);
int hc_hipEventRecord (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent, HIPstream hStream);
int hc_hipEventSynchronize (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent);
int hc_hipFuncGetAttribute (hashcat_ctx_t *hashcat_ctx, int *pi, HIPfunction_attribute attrib, HIPfunction hfunc);
int hc_hipFuncSetAttribute (hashcat_ctx_t *hashcat_ctx, HIPfunction hfunc, HIPfunction_attribute attrib, int value);
int hc_hipInit (hashcat_ctx_t *hashcat_ctx, unsigned int Flags);
int hc_hipLaunchKernel (hashcat_ctx_t *hashcat_ctx, HIPfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, HIPstream hStream, void **kernelParams, void **extra);
int hc_hipMemAlloc (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr *dptr, size_t bytesize);
int hc_hipMemcpyDtoD (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dstDevice, HIPdeviceptr srcDevice, size_t ByteCount);
int hc_hipMemcpyDtoH (hashcat_ctx_t *hashcat_ctx, void *dstHost, HIPdeviceptr srcDevice, size_t ByteCount);
int hc_hipMemcpyHtoD (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dstDevice, const void *srcHost, size_t ByteCount);
int hc_hipMemFree (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dptr);
int hc_hipModuleGetFunction (hashcat_ctx_t *hashcat_ctx, HIPfunction *hfunc, HIPmodule hmod, const char *name);
int hc_hipModuleLoadDataEx (hashcat_ctx_t *hashcat_ctx, HIPmodule *module, const void *image, unsigned int numOptions, HIPjit_option *options, void **optionValues);
int hc_hipModuleUnload (hashcat_ctx_t *hashcat_ctx, HIPmodule hmod);
int hc_hipStreamCreate (hashcat_ctx_t *hashcat_ctx, HIPstream *phStream, unsigned int Flags);
int hc_hipStreamDestroy (hashcat_ctx_t *hashcat_ctx, HIPstream hStream);
int hc_hipStreamSynchronize (hashcat_ctx_t *hashcat_ctx, HIPstream hStream);
int hc_hipCtxPushCurrent (hashcat_ctx_t *hashcat_ctx, HIPcontext ctx);
int hc_hipCtxPopCurrent (hashcat_ctx_t *hashcat_ctx, HIPcontext *pctx);
int hc_hipLinkCreate (hashcat_ctx_t *hashcat_ctx, unsigned int numOptions, HIPjit_option *options, void **optionValues, HIPlinkState *stateOut);
int hc_hipLinkAddData (hashcat_ctx_t *hashcat_ctx, HIPlinkState state, HIPjitInputType type, void *data, size_t size, const char *name, unsigned int numOptions, HIPjit_option *options, void **optionValues);
int hc_hipLinkDestroy (hashcat_ctx_t *hashcat_ctx, HIPlinkState state);
int hc_hipLinkComplete (hashcat_ctx_t *hashcat_ctx, HIPlinkState state, void **hipbinOut, size_t *sizeOut);
int hc_hipCtxCreate (hashcat_ctx_t *hashcat_ctx, HIPcontext *pctx, unsigned int flags, HIPdevice dev);
int hc_hipCtxDestroy (hashcat_ctx_t *hashcat_ctx, HIPcontext ctx);
int hc_hipCtxSetCurrent (hashcat_ctx_t *hashcat_ctx, HIPcontext ctx);
int hc_hipCtxSetCacheConfig (hashcat_ctx_t *hashcat_ctx, HIPfunc_cache config);
int hc_hipCtxSynchronize (hashcat_ctx_t *hashcat_ctx);
int hc_hipDeviceGetAttribute (hashcat_ctx_t *hashcat_ctx, int *pi, HIPdevice_attribute attrib, HIPdevice dev);
int hc_hipDeviceGetCount (hashcat_ctx_t *hashcat_ctx, int *count);
int hc_hipDeviceGet (hashcat_ctx_t *hashcat_ctx, HIPdevice *device, int ordinal);
int hc_hipDeviceGetName (hashcat_ctx_t *hashcat_ctx, char *name, int len, HIPdevice dev);
int hc_hipDeviceTotalMem (hashcat_ctx_t *hashcat_ctx, size_t *bytes, HIPdevice dev);
int hc_hipDriverGetVersion (hashcat_ctx_t *hashcat_ctx, int *driverVersion);
int hc_hipEventCreate (hashcat_ctx_t *hashcat_ctx, HIPevent *phEvent, unsigned int Flags);
int hc_hipEventDestroy (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent);
int hc_hipEventElapsedTime (hashcat_ctx_t *hashcat_ctx, float *pMilliseconds, HIPevent hStart, HIPevent hEnd);
int hc_hipEventQuery (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent);
int hc_hipEventRecord (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent, HIPstream hStream);
int hc_hipEventSynchronize (hashcat_ctx_t *hashcat_ctx, HIPevent hEvent);
int hc_hipFuncGetAttribute (hashcat_ctx_t *hashcat_ctx, int *pi, HIPfunction_attribute attrib, HIPfunction hfunc);
int hc_hipFuncSetAttribute (hashcat_ctx_t *hashcat_ctx, HIPfunction hfunc, HIPfunction_attribute attrib, int value);
int hc_hipInit (hashcat_ctx_t *hashcat_ctx, unsigned int Flags);
int hc_hipLaunchKernel (hashcat_ctx_t *hashcat_ctx, HIPfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, HIPstream hStream, void **kernelParams, void **extra);
int hc_hipMemAlloc (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr *dptr, size_t bytesize);
int hc_hipMemcpyDtoD (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dstDevice, HIPdeviceptr srcDevice, size_t ByteCount);
int hc_hipMemcpyDtoH (hashcat_ctx_t *hashcat_ctx, void *dstHost, HIPdeviceptr srcDevice, size_t ByteCount);
int hc_hipMemcpyHtoD (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dstDevice, const void *srcHost, size_t ByteCount);
int hc_hipMemFree (hashcat_ctx_t *hashcat_ctx, HIPdeviceptr dptr);
int hc_hipModuleGetFunction (hashcat_ctx_t *hashcat_ctx, HIPfunction *hfunc, HIPmodule hmod, const char *name);
int hc_hipModuleLoadDataEx (hashcat_ctx_t *hashcat_ctx, HIPmodule *module, const void *image, unsigned int numOptions, HIPjit_option *options, void **optionValues);
int hc_hipModuleUnload (hashcat_ctx_t *hashcat_ctx, HIPmodule hmod);
int hc_hipStreamCreate (hashcat_ctx_t *hashcat_ctx, HIPstream *phStream, unsigned int Flags);
int hc_hipStreamDestroy (hashcat_ctx_t *hashcat_ctx, HIPstream hStream);
int hc_hipStreamSynchronize (hashcat_ctx_t *hashcat_ctx, HIPstream hStream);
int hc_hipCtxPushCurrent (hashcat_ctx_t *hashcat_ctx, HIPcontext ctx);
int hc_hipCtxPopCurrent (hashcat_ctx_t *hashcat_ctx, HIPcontext *pctx);
int hc_hipLinkCreate (hashcat_ctx_t *hashcat_ctx, unsigned int numOptions, HIPjit_option *options, void **optionValues, HIPlinkState *stateOut);
int hc_hipLinkAddData (hashcat_ctx_t *hashcat_ctx, HIPlinkState state, HIPjitInputType type, void *data, size_t size, const char *name, unsigned int numOptions, HIPjit_option *options, void **optionValues);
int hc_hipLinkDestroy (hashcat_ctx_t *hashcat_ctx, HIPlinkState state);
int hc_hipLinkComplete (hashcat_ctx_t *hashcat_ctx, HIPlinkState state, void **cubinOut, size_t *sizeOut);
int hc_clBuildProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data);
int hc_clCompileProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, cl_uint num_input_headers, const cl_program *input_headers, const char **header_include_names, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data);
@@ -177,19 +175,20 @@ int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param,
void rebuild_pws_compressed_append (hc_device_param_t *device_param, const u64 pws_cnt, const u8 chr);
int run_cuda_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u64 num);
int run_cuda_kernel_utf8toutf16le (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u64 num);
int run_cuda_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u32 value, const u64 size);
int run_cuda_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u64 size);
int run_cuda_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u64 num);
int run_cuda_kernel_utf8toutf16le (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u64 num);
int run_cuda_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u32 value, const u64 size);
int run_cuda_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u64 size);
int run_hip_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u64 num);
int run_hip_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u32 value, const u64 size);
int run_hip_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u64 size);
int run_hip_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u64 num);
int run_hip_kernel_utf8toutf16le (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u64 num);
int run_hip_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u32 value, const u64 size);
int run_hip_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, HIPdeviceptr buf, const u64 size);
int run_opencl_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u64 num);
int run_opencl_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u64 num);
int run_opencl_kernel_utf8toutf16le (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u64 num);
int run_opencl_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u32 value, const u64 size);
int run_opencl_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u64 size);
int run_opencl_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u32 value, const u64 size);
int run_opencl_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u64 size);
int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 kern_run, const u64 pws_pos, const u64 num, const u32 event_update, const u32 iteration);
int run_kernel_mp (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 kern_run, const u64 num);
+157 -151
View File
@@ -184,6 +184,7 @@ typedef enum vendor_id
VENDOR_ID_NV = (1U << 5),
VENDOR_ID_POCL = (1U << 6),
VENDOR_ID_AMD_USE_INTEL = (1U << 7),
VENDOR_ID_AMD_USE_HIP = (1U << 8),
VENDOR_ID_GENERIC = (1U << 31)
} vendor_id_t;
@@ -696,114 +697,114 @@ typedef enum user_options_map
IDX_ATTACK_MODE = 'a',
IDX_BACKEND_DEVICES = 'd',
IDX_BACKEND_IGNORE_CUDA = 0xff01,
IDX_BACKEND_IGNORE_HIP = 0xff4d,
IDX_BACKEND_IGNORE_OPENCL = 0xff02,
IDX_BACKEND_IGNORE_HIP = 0xff02,
IDX_BACKEND_IGNORE_OPENCL = 0xff03,
IDX_BACKEND_INFO = 'I',
IDX_BACKEND_VECTOR_WIDTH = 0xff03,
IDX_BENCHMARK_ALL = 0xff04,
IDX_BACKEND_VECTOR_WIDTH = 0xff04,
IDX_BENCHMARK_ALL = 0xff05,
IDX_BENCHMARK = 'b',
IDX_BITMAP_MAX = 0xff05,
IDX_BITMAP_MIN = 0xff06,
IDX_BITMAP_MAX = 0xff06,
IDX_BITMAP_MIN = 0xff07,
#ifdef WITH_BRAIN
IDX_BRAIN_CLIENT = 'z',
IDX_BRAIN_CLIENT_FEATURES = 0xff07,
IDX_BRAIN_HOST = 0xff08,
IDX_BRAIN_PASSWORD = 0xff09,
IDX_BRAIN_PORT = 0xff0a,
IDX_BRAIN_SERVER = 0xff0b,
IDX_BRAIN_SERVER_TIMER = 0xff0c,
IDX_BRAIN_SESSION = 0xff0d,
IDX_BRAIN_SESSION_WHITELIST = 0xff0e,
IDX_BRAIN_CLIENT_FEATURES = 0xff08,
IDX_BRAIN_HOST = 0xff09,
IDX_BRAIN_PASSWORD = 0xff0a,
IDX_BRAIN_PORT = 0xff0b,
IDX_BRAIN_SERVER = 0xff0c,
IDX_BRAIN_SERVER_TIMER = 0xff0d,
IDX_BRAIN_SESSION = 0xff0e,
IDX_BRAIN_SESSION_WHITELIST = 0xff0f,
#endif
IDX_CPU_AFFINITY = 0xff0f,
IDX_CPU_AFFINITY = 0xff10,
IDX_CUSTOM_CHARSET_1 = '1',
IDX_CUSTOM_CHARSET_2 = '2',
IDX_CUSTOM_CHARSET_3 = '3',
IDX_CUSTOM_CHARSET_4 = '4',
IDX_DEBUG_FILE = 0xff10,
IDX_DEBUG_MODE = 0xff11,
IDX_ENCODING_FROM = 0xff12,
IDX_ENCODING_TO = 0xff13,
IDX_HASH_INFO = 0xff14,
IDX_FORCE = 0xff15,
IDX_HWMON_DISABLE = 0xff16,
IDX_HWMON_TEMP_ABORT = 0xff17,
IDX_DEBUG_FILE = 0xff11,
IDX_DEBUG_MODE = 0xff12,
IDX_ENCODING_FROM = 0xff13,
IDX_ENCODING_TO = 0xff14,
IDX_HASH_INFO = 0xff15,
IDX_FORCE = 0xff16,
IDX_HWMON_DISABLE = 0xff17,
IDX_HWMON_TEMP_ABORT = 0xff18,
IDX_HASH_MODE = 'm',
IDX_HCCAPX_MESSAGE_PAIR = 0xff18,
IDX_HCCAPX_MESSAGE_PAIR = 0xff19,
IDX_HELP = 'h',
IDX_HEX_CHARSET = 0xff19,
IDX_HEX_SALT = 0xff1a,
IDX_HEX_WORDLIST = 0xff1b,
IDX_HOOK_THREADS = 0xff1c,
IDX_IDENTIFY = 0xff1d,
IDX_HEX_CHARSET = 0xff1a,
IDX_HEX_SALT = 0xff1b,
IDX_HEX_WORDLIST = 0xff1c,
IDX_HOOK_THREADS = 0xff1d,
IDX_IDENTIFY = 0xff1e,
IDX_INCREMENT = 'i',
IDX_INCREMENT_MAX = 0xff1e,
IDX_INCREMENT_MIN = 0xff1f,
IDX_INDUCTION_DIR = 0xff20,
IDX_KEEP_GUESSING = 0xff21,
IDX_INCREMENT_MAX = 0xff1f,
IDX_INCREMENT_MIN = 0xff20,
IDX_INDUCTION_DIR = 0xff21,
IDX_KEEP_GUESSING = 0xff22,
IDX_KERNEL_ACCEL = 'n',
IDX_KERNEL_LOOPS = 'u',
IDX_KERNEL_THREADS = 'T',
IDX_KEYBOARD_LAYOUT_MAPPING = 0xff22,
IDX_KEYSPACE = 0xff23,
IDX_LEFT = 0xff24,
IDX_KEYBOARD_LAYOUT_MAPPING = 0xff23,
IDX_KEYSPACE = 0xff24,
IDX_LEFT = 0xff25,
IDX_LIMIT = 'l',
IDX_LOGFILE_DISABLE = 0xff25,
IDX_LOOPBACK = 0xff26,
IDX_MACHINE_READABLE = 0xff27,
IDX_MARKOV_CLASSIC = 0xff28,
IDX_MARKOV_DISABLE = 0xff29,
IDX_MARKOV_HCSTAT2 = 0xff2a,
IDX_MARKOV_INVERSE = 0xff2b,
IDX_LOGFILE_DISABLE = 0xff26,
IDX_LOOPBACK = 0xff27,
IDX_MACHINE_READABLE = 0xff28,
IDX_MARKOV_CLASSIC = 0xff29,
IDX_MARKOV_DISABLE = 0xff2a,
IDX_MARKOV_HCSTAT2 = 0xff2b,
IDX_MARKOV_INVERSE = 0xff2c,
IDX_MARKOV_THRESHOLD = 't',
IDX_NONCE_ERROR_CORRECTIONS = 0xff2c,
IDX_NONCE_ERROR_CORRECTIONS = 0xff2d,
IDX_OPENCL_DEVICE_TYPES = 'D',
IDX_OPTIMIZED_KERNEL_ENABLE = 'O',
IDX_OUTFILE_AUTOHEX_DISABLE = 0xff2d,
IDX_OUTFILE_CHECK_DIR = 0xff2e,
IDX_OUTFILE_CHECK_TIMER = 0xff2f,
IDX_OUTFILE_FORMAT = 0xff30,
IDX_OUTFILE_AUTOHEX_DISABLE = 0xff2e,
IDX_OUTFILE_CHECK_DIR = 0xff2f,
IDX_OUTFILE_CHECK_TIMER = 0xff30,
IDX_OUTFILE_FORMAT = 0xff31,
IDX_OUTFILE = 'o',
IDX_POTFILE_DISABLE = 0xff31,
IDX_POTFILE_PATH = 0xff32,
IDX_PROGRESS_ONLY = 0xff33,
IDX_QUIET = 0xff34,
IDX_REMOVE = 0xff35,
IDX_REMOVE_TIMER = 0xff36,
IDX_RESTORE = 0xff37,
IDX_RESTORE_DISABLE = 0xff38,
IDX_RESTORE_FILE_PATH = 0xff39,
IDX_POTFILE_DISABLE = 0xff32,
IDX_POTFILE_PATH = 0xff33,
IDX_PROGRESS_ONLY = 0xff34,
IDX_QUIET = 0xff35,
IDX_REMOVE = 0xff36,
IDX_REMOVE_TIMER = 0xff37,
IDX_RESTORE = 0xff38,
IDX_RESTORE_DISABLE = 0xff39,
IDX_RESTORE_FILE_PATH = 0xff3a,
IDX_RP_FILE = 'r',
IDX_RP_GEN_FUNC_MAX = 0xff3a,
IDX_RP_GEN_FUNC_MIN = 0xff3b,
IDX_RP_GEN_FUNC_MAX = 0xff3b,
IDX_RP_GEN_FUNC_MIN = 0xff3c,
IDX_RP_GEN = 'g',
IDX_RP_GEN_SEED = 0xff3c,
IDX_RP_GEN_SEED = 0xff3d,
IDX_RULE_BUF_L = 'j',
IDX_RULE_BUF_R = 'k',
IDX_RUNTIME = 0xff3d,
IDX_SCRYPT_TMTO = 0xff3e,
IDX_RUNTIME = 0xff3e,
IDX_SCRYPT_TMTO = 0xff3f,
IDX_SEGMENT_SIZE = 'c',
IDX_SELF_TEST_DISABLE = 0xff3f,
IDX_SELF_TEST_DISABLE = 0xff40,
IDX_SEPARATOR = 'p',
IDX_SESSION = 0xff40,
IDX_SHOW = 0xff41,
IDX_SESSION = 0xff41,
IDX_SHOW = 0xff42,
IDX_SKIP = 's',
IDX_SLOW_CANDIDATES = 'S',
IDX_SPEED_ONLY = 0xff42,
IDX_SPIN_DAMP = 0xff43,
IDX_STATUS = 0xff44,
IDX_STATUS_JSON = 0xff45,
IDX_STATUS_TIMER = 0xff46,
IDX_STDOUT_FLAG = 0xff47,
IDX_STDIN_TIMEOUT_ABORT = 0xff48,
IDX_TRUECRYPT_KEYFILES = 0xff49,
IDX_USERNAME = 0xff4a,
IDX_VERACRYPT_KEYFILES = 0xff4b,
IDX_VERACRYPT_PIM_START = 0xff4c,
IDX_VERACRYPT_PIM_STOP = 0xff4d,
IDX_SPEED_ONLY = 0xff43,
IDX_SPIN_DAMP = 0xff44,
IDX_STATUS = 0xff45,
IDX_STATUS_JSON = 0xff46,
IDX_STATUS_TIMER = 0xff47,
IDX_STDOUT_FLAG = 0xff48,
IDX_STDIN_TIMEOUT_ABORT = 0xff49,
IDX_TRUECRYPT_KEYFILES = 0xff4a,
IDX_USERNAME = 0xff4b,
IDX_VERACRYPT_KEYFILES = 0xff4c,
IDX_VERACRYPT_PIM_START = 0xff4d,
IDX_VERACRYPT_PIM_STOP = 0xff4e,
IDX_VERSION_LOWER = 'v',
IDX_VERSION = 'V',
IDX_WORDLIST_AUTOHEX_DISABLE = 0xff4e,
IDX_WORDLIST_AUTOHEX_DISABLE = 0xff4f,
IDX_WORKLOAD_PROFILE = 'w',
} user_options_map_t;
@@ -1485,82 +1486,83 @@ typedef struct hc_device_param
// API: hip
bool is_hip;
bool is_hip;
int hip_warp_size;
int hip_warp_size;
HIPdevice hip_device;
HIPcontext hip_context;
HIPstream hip_stream;
HIPdevice hip_device;
HIPcontext hip_context;
HIPstream hip_stream;
HIPevent hip_event1;
HIPevent hip_event2;
HIPevent hip_event1;
HIPevent hip_event2;
HIPmodule hip_module;
HIPmodule hip_module_shared;
HIPmodule hip_module_mp;
HIPmodule hip_module_amp;
HIPmodule hip_module;
HIPmodule hip_module_shared;
HIPmodule hip_module_mp;
HIPmodule hip_module_amp;
HIPfunction hip_function1;
HIPfunction hip_function12;
HIPfunction hip_function2;
HIPfunction hip_function2e;
HIPfunction hip_function23;
HIPfunction hip_function3;
HIPfunction hip_function4;
HIPfunction hip_function_init2;
HIPfunction hip_function_loop2;
HIPfunction hip_function_mp;
HIPfunction hip_function_mp_l;
HIPfunction hip_function_mp_r;
HIPfunction hip_function_amp;
HIPfunction hip_function_tm;
HIPfunction hip_function_memset;
HIPfunction hip_function_atinit;
HIPfunction hip_function_decompress;
HIPfunction hip_function_aux1;
HIPfunction hip_function_aux2;
HIPfunction hip_function_aux3;
HIPfunction hip_function_aux4;
HIPfunction hip_function1;
HIPfunction hip_function12;
HIPfunction hip_function2p;
HIPfunction hip_function2;
HIPfunction hip_function2e;
HIPfunction hip_function23;
HIPfunction hip_function3;
HIPfunction hip_function4;
HIPfunction hip_function_init2;
HIPfunction hip_function_loop2p;
HIPfunction hip_function_loop2;
HIPfunction hip_function_mp;
HIPfunction hip_function_mp_l;
HIPfunction hip_function_mp_r;
HIPfunction hip_function_amp;
HIPfunction hip_function_tm;
HIPfunction hip_function_memset;
HIPfunction hip_function_atinit;
HIPfunction hip_function_utf8toutf16le;
HIPfunction hip_function_decompress;
HIPfunction hip_function_aux1;
HIPfunction hip_function_aux2;
HIPfunction hip_function_aux3;
HIPfunction hip_function_aux4;
HIPdeviceptr hip_d_pws_buf;
HIPdeviceptr hip_d_pws_amp_buf;
HIPdeviceptr hip_d_pws_comp_buf;
HIPdeviceptr hip_d_pws_idx;
HIPdeviceptr hip_d_words_buf_l;
HIPdeviceptr hip_d_words_buf_r;
HIPdeviceptr hip_d_rules;
HIPdeviceptr hip_d_rules_c;
HIPdeviceptr hip_d_combs;
HIPdeviceptr hip_d_combs_c;
HIPdeviceptr hip_d_bfs;
HIPdeviceptr hip_d_bfs_c;
HIPdeviceptr hip_d_tm_c;
HIPdeviceptr hip_d_bitmap_s1_a;
HIPdeviceptr hip_d_bitmap_s1_b;
HIPdeviceptr hip_d_bitmap_s1_c;
HIPdeviceptr hip_d_bitmap_s1_d;
HIPdeviceptr hip_d_bitmap_s2_a;
HIPdeviceptr hip_d_bitmap_s2_b;
HIPdeviceptr hip_d_bitmap_s2_c;
HIPdeviceptr hip_d_bitmap_s2_d;
HIPdeviceptr hip_d_plain_bufs;
HIPdeviceptr hip_d_digests_buf;
HIPdeviceptr hip_d_digests_shown;
HIPdeviceptr hip_d_salt_bufs;
HIPdeviceptr hip_d_esalt_bufs;
HIPdeviceptr hip_d_tmps;
HIPdeviceptr hip_d_hooks;
HIPdeviceptr hip_d_result;
HIPdeviceptr hip_d_extra0_buf;
HIPdeviceptr hip_d_extra1_buf;
HIPdeviceptr hip_d_extra2_buf;
HIPdeviceptr hip_d_extra3_buf;
HIPdeviceptr hip_d_root_css_buf;
HIPdeviceptr hip_d_markov_css_buf;
HIPdeviceptr hip_d_st_digests_buf;
HIPdeviceptr hip_d_st_salts_buf;
HIPdeviceptr hip_d_st_esalts_buf;
HIPdeviceptr hip_d_pws_buf;
HIPdeviceptr hip_d_pws_amp_buf;
HIPdeviceptr hip_d_pws_comp_buf;
HIPdeviceptr hip_d_pws_idx;
HIPdeviceptr hip_d_rules;
HIPdeviceptr hip_d_rules_c;
HIPdeviceptr hip_d_combs;
HIPdeviceptr hip_d_combs_c;
HIPdeviceptr hip_d_bfs;
HIPdeviceptr hip_d_bfs_c;
HIPdeviceptr hip_d_tm_c;
HIPdeviceptr hip_d_bitmap_s1_a;
HIPdeviceptr hip_d_bitmap_s1_b;
HIPdeviceptr hip_d_bitmap_s1_c;
HIPdeviceptr hip_d_bitmap_s1_d;
HIPdeviceptr hip_d_bitmap_s2_a;
HIPdeviceptr hip_d_bitmap_s2_b;
HIPdeviceptr hip_d_bitmap_s2_c;
HIPdeviceptr hip_d_bitmap_s2_d;
HIPdeviceptr hip_d_plain_bufs;
HIPdeviceptr hip_d_digests_buf;
HIPdeviceptr hip_d_digests_shown;
HIPdeviceptr hip_d_salt_bufs;
HIPdeviceptr hip_d_esalt_bufs;
HIPdeviceptr hip_d_tmps;
HIPdeviceptr hip_d_hooks;
HIPdeviceptr hip_d_result;
HIPdeviceptr hip_d_extra0_buf;
HIPdeviceptr hip_d_extra1_buf;
HIPdeviceptr hip_d_extra2_buf;
HIPdeviceptr hip_d_extra3_buf;
HIPdeviceptr hip_d_root_css_buf;
HIPdeviceptr hip_d_markov_css_buf;
HIPdeviceptr hip_d_st_digests_buf;
HIPdeviceptr hip_d_st_salts_buf;
HIPdeviceptr hip_d_st_esalts_buf;
// API: opencl
@@ -1653,10 +1655,10 @@ typedef struct backend_ctx
{
bool enabled;
void *ocl;
void *cuda;
void *hip;
void *ocl;
void *nvrtc;
void *hiprtc;
@@ -1667,6 +1669,7 @@ typedef struct backend_ctx
int backend_devices_cnt;
int backend_devices_active;
int cuda_devices_cnt;
int cuda_devices_active;
int hip_devices_cnt;
@@ -1704,7 +1707,10 @@ typedef struct backend_ctx
int nvrtc_driver_version;
int cuda_driver_version;
// cuda
// hip
int rc_hip_init;
int rc_hiprtc_init;
int hiprtc_driver_version;
int hip_driver_version;