mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-14 03:39:09 +00:00
Merge pull request #3156 from matrix/metal_hostCode
Backends: added Metal host-code
This commit is contained in:
commit
ace160d810
@ -13,10 +13,11 @@
|
||||
## Features
|
||||
##
|
||||
|
||||
- Added support to building Universal macOS binary on Apple Silicon
|
||||
- Added support to use --debug-mode in attack-mode 9 (Association Attack)
|
||||
- Added guess data to --status-json output
|
||||
- Added hex format for --separator option
|
||||
- Added new backend support for Metal, the OpenCL replacement API on Apple
|
||||
- Added support to building Universal macOS binary on Apple Silicon
|
||||
- Added support to use --debug-mode in attack-mode 9 (Association Attack)
|
||||
|
||||
##
|
||||
## Bugs
|
||||
|
@ -21,6 +21,7 @@ Gabriele "matrix" Gristina <matrix@hashcat.net> (@gm4tr1x)
|
||||
* Multiple kernel modules
|
||||
* Compressed wordlist feature
|
||||
* OpenCL Info feature
|
||||
* Apple Metal Runtime API feature
|
||||
* Apple macOS port
|
||||
* Apple Silicon support
|
||||
* Universal binary on Apple Silicon
|
||||
|
@ -40,43 +40,51 @@ int backend_session_update_mp (hashcat_ctx_t *hashcat_ctx);
|
||||
int backend_session_update_mp_rl (hashcat_ctx_t *hashcat_ctx, const u32 css_cnt_l, const u32 css_cnt_r);
|
||||
|
||||
void generate_source_kernel_filename (const bool slow_candidates, const u32 attack_exec, const u32 attack_kern, const u32 kern_type, const u32 opti_type, char *shared_dir, char *source_file);
|
||||
void generate_cached_kernel_filename (const bool slow_candidates, const u32 attack_exec, const u32 attack_kern, const u32 kern_type, const u32 opti_type, char *cache_dir, const char *device_name_chksum, char *cached_file);
|
||||
void generate_cached_kernel_filename (const bool slow_candidates, const u32 attack_exec, const u32 attack_kern, const u32 kern_type, const u32 opti_type, char *cache_dir, const char *device_name_chksum, char *cached_file, bool is_metal);
|
||||
void generate_source_kernel_shared_filename (char *shared_dir, char *source_file);
|
||||
void generate_cached_kernel_shared_filename (char *cache_dir, const char *device_name_chksum, char *cached_file);
|
||||
void generate_cached_kernel_shared_filename (char *cache_dir, const char *device_name_chksum, char *cached_file, bool is_metal);
|
||||
void generate_source_kernel_mp_filename (const u32 opti_type, const u64 opts_type, char *shared_dir, char *source_file);
|
||||
void generate_cached_kernel_mp_filename (const u32 opti_type, const u64 opts_type, char *cache_dir, const char *device_name_chksum, char *cached_file);
|
||||
void generate_cached_kernel_mp_filename (const u32 opti_type, const u64 opts_type, char *cache_dir, const char *device_name_chksum, char *cached_file, bool is_metal);
|
||||
void generate_source_kernel_amp_filename (const u32 attack_kern, char *shared_dir, char *source_file);
|
||||
void generate_cached_kernel_amp_filename (const u32 attack_kern, char *cache_dir, const char *device_name_chksum, char *cached_file);
|
||||
void generate_cached_kernel_amp_filename (const u32 attack_kern, char *cache_dir, const char *device_name_chksum, char *cached_file, bool is_metal);
|
||||
|
||||
int gidd_to_pw_t (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw);
|
||||
int gidd_to_pw_t (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 gidd, pw_t *pw);
|
||||
|
||||
int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 highest_pw_len, const u64 pws_pos, const u64 pws_cnt, const u32 fast_iteration, const u32 salt_pos);
|
||||
int choose_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u32 highest_pw_len, const u64 pws_pos, const u64 pws_cnt, const u32 fast_iteration, const u32 salt_pos);
|
||||
|
||||
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 u64 offset, const u8 value, const u64 size);
|
||||
int run_cuda_kernel_memset32 (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u64 offset, 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 u64 offset, const u8 value, const u64 size);
|
||||
int run_cuda_kernel_memset32 (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, CUdeviceptr buf, const u64 offset, 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_t buf, const u64 num);
|
||||
int run_hip_kernel_utf8toutf16le (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 num);
|
||||
int run_hip_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 offset, const u8 value, const u64 size);
|
||||
int run_hip_kernel_memset32 (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 offset, const u32 value, const u64 size);
|
||||
int run_hip_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 size);
|
||||
int run_hip_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 num);
|
||||
int run_hip_kernel_utf8toutf16le (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 num);
|
||||
int run_hip_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 offset, const u8 value, const u64 size);
|
||||
int run_hip_kernel_memset32 (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t buf, const u64 offset, const u32 value, const u64 size);
|
||||
int run_hip_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, hipDeviceptr_t 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_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 u64 offset, const u8 value, const u64 size);
|
||||
int run_opencl_kernel_memset32 (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u64 offset, 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);
|
||||
#if defined (__APPLE__)
|
||||
int run_metal_kernel_atinit (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, mtl_mem buf, const u64 num);
|
||||
int run_metal_kernel_utf8toutf16le (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, mtl_mem buf, const u64 num);
|
||||
int run_metal_kernel_memset (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, mtl_mem buf, const u64 offset, const u8 value, const u64 size);
|
||||
int run_metal_kernel_memset32 (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, mtl_mem buf, const u64 offset, const u32 value, const u64 size);
|
||||
int run_metal_kernel_bzero (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, mtl_mem buf, const u64 size);
|
||||
#endif
|
||||
|
||||
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);
|
||||
int run_kernel_tm (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param);
|
||||
int run_kernel_amp (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 num);
|
||||
int run_kernel_decompress (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 num);
|
||||
int run_copy (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_cnt);
|
||||
int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_pos, const u64 pws_cnt);
|
||||
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 u64 offset, const u8 value, const u64 size);
|
||||
int run_opencl_kernel_memset32 (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, cl_mem buf, const u64 offset, 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);
|
||||
int run_kernel_tm (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param);
|
||||
int run_kernel_amp (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 num);
|
||||
int run_kernel_decompress (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 num);
|
||||
int run_copy (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_cnt);
|
||||
int run_cracker (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const u64 pws_pos, const u64 pws_cnt);
|
||||
|
||||
void *hook12_thread (void *p);
|
||||
void *hook23_thread (void *p);
|
||||
|
118
include/ext_metal.h
Normal file
118
include/ext_metal.h
Normal file
@ -0,0 +1,118 @@
|
||||
/**
|
||||
* Author......: See docs/credits.txt
|
||||
* License.....: MIT
|
||||
*/
|
||||
|
||||
#ifndef _EXT_METAL_H
|
||||
#define _EXT_METAL_H
|
||||
|
||||
#if defined (__APPLE__)
|
||||
|
||||
#include <objc/runtime.h>
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
#define mtl_device_id id
|
||||
#define mtl_command_queue id
|
||||
#define mtl_function id
|
||||
#define mtl_pipeline id
|
||||
#define mtl_mem id
|
||||
#define mtl_library id
|
||||
#define mtl_command_buffer id
|
||||
#define mtl_command_encoder id
|
||||
#define mtl_blit_command_encoder id
|
||||
#define mtl_compute_command_encoder id
|
||||
|
||||
typedef enum metalDeviceAttribute
|
||||
{
|
||||
MTL_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 1,
|
||||
MTL_DEVICE_ATTRIBUTE_UNIFIED_MEMORY,
|
||||
MTL_DEVICE_ATTRIBUTE_WARP_SIZE,
|
||||
MTL_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR,
|
||||
MTL_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR,
|
||||
MTL_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK,
|
||||
MTL_DEVICE_ATTRIBUTE_CLOCK_RATE,
|
||||
MTL_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK,
|
||||
MTL_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY,
|
||||
MTL_DEVICE_ATTRIBUTE_MAX_TRANSFER_RATE,
|
||||
MTL_DEVICE_ATTRIBUTE_HEADLESS,
|
||||
MTL_DEVICE_ATTRIBUTE_LOW_POWER,
|
||||
MTL_DEVICE_ATTRIBUTE_REMOVABLE,
|
||||
MTL_DEVICE_ATTRIBUTE_REGISTRY_ID,
|
||||
MTL_DEVICE_ATTRIBUTE_PHYSICAL_LOCATION,
|
||||
MTL_DEVICE_ATTRIBUTE_LOCATION_NUMBER,
|
||||
|
||||
} metalDeviceAttribute_t;
|
||||
|
||||
typedef enum metalDeviceLocation
|
||||
{
|
||||
// MTLDeviceLocationBuiltIn
|
||||
// The GPU is built into the device
|
||||
MTL_DEVICE_LOCATION_BUILTIN = 0,
|
||||
|
||||
// MTLDeviceLocationSlot
|
||||
// The GPU is connected to a slot inside the computer
|
||||
MTL_DEVICE_LOCATION_SLOT = 1,
|
||||
|
||||
// MTLDeviceLocationExternal
|
||||
// The GPU is connected via an external interface, such as Thunderbolt
|
||||
MTL_DEVICE_LOCATION_EXTERNAL = 2,
|
||||
|
||||
// MTLDeviceLocationUnspecified
|
||||
// The GPU's location is not specified or cannot be determined
|
||||
MTL_DEVICE_LOCATION_UNSPECIFIED = 4294967295,
|
||||
|
||||
} metalDeviceLocation_t;
|
||||
|
||||
typedef struct hc_metal
|
||||
{
|
||||
CFArrayRef devices;
|
||||
|
||||
} hc_metal_t;
|
||||
|
||||
typedef hc_metal_t MTL_PTR;
|
||||
|
||||
int mtl_init (void *hashcat_ctx);
|
||||
void mtl_close (void *hashcat_ctx);
|
||||
|
||||
int hc_mtlRuntimeGetVersionString (void *hashcat_ctx, char *runtimeVersion_str, size_t *size);
|
||||
|
||||
int hc_mtlDeviceGetCount (void *hashcat_ctx, int *count);
|
||||
int hc_mtlDeviceGet (void *hashcat_ctx, mtl_device_id *metal_device, int ordinal);
|
||||
int hc_mtlDeviceGetName (void *hashcat_ctx, char *name, size_t len, mtl_device_id metal_device);
|
||||
int hc_mtlDeviceGetAttribute (void *hashcat_ctx, int *pi, metalDeviceAttribute_t attrib, mtl_device_id metal_device);
|
||||
int hc_mtlDeviceTotalMem (void *hashcat_ctx, size_t *bytes, mtl_device_id metal_device);
|
||||
int hc_mtlDeviceMaxMemAlloc (void *hashcat_ctx, size_t *bytes, mtl_device_id metal_device);
|
||||
int hc_mtlMemGetInfo (void *hashcat_ctx, size_t *mem_free, size_t *mem_total);
|
||||
|
||||
int hc_mtlCreateCommandQueue (void *hashcat_ctx, mtl_device_id metal_device, mtl_command_queue *command_queue);
|
||||
int hc_mtlCreateBuffer (void *hashcat_ctx, mtl_device_id metal_device, size_t size, void *ptr, mtl_mem *metal_buffer);
|
||||
|
||||
int hc_mtlCreateKernel (void *hashcat_ctx, mtl_device_id metal_device, mtl_library metal_library, const char *func_name, mtl_function *metal_function, mtl_pipeline *metal_pipeline);
|
||||
|
||||
int hc_mtlGetMaxTotalThreadsPerThreadgroup (void *hashcat_ctx, mtl_pipeline metal_pipeline, unsigned int *maxTotalThreadsPerThreadgroup);
|
||||
int hc_mtlGetThreadExecutionWidth (void *hashcat_ctx, mtl_pipeline metal_pipeline, unsigned int *threadExecutionWidth);
|
||||
|
||||
// copy buffer
|
||||
int hc_mtlMemcpyDtoD (void *hashcat_ctx, mtl_command_queue command_queue, mtl_mem buf_dst, size_t buf_dst_off, mtl_mem buf_src, size_t buf_src_off, size_t buf_size);
|
||||
// write
|
||||
int hc_mtlMemcpyHtoD (void *hashcat_ctx, mtl_command_queue command_queue, mtl_mem buf_dst, size_t buf_dst_off, const void *buf_src, size_t buf_size);
|
||||
// read
|
||||
int hc_mtlMemcpyDtoH (void *hashcat_ctx, mtl_command_queue command_queue, void *buf_dst, mtl_mem buf_src, size_t buf_src_off, size_t buf_size);
|
||||
|
||||
int hc_mtlReleaseMemObject (void *hashcat_ctx, mtl_mem metal_buffer);
|
||||
int hc_mtlReleaseFunction (void *hashcat_ctx, mtl_function metal_function);
|
||||
int hc_mtlReleaseLibrary (void *hashcat_ctx, mtl_function metal_library);
|
||||
int hc_mtlReleaseCommandQueue (void *hashcat_ctx, mtl_command_queue command_queue);
|
||||
int hc_mtlReleaseDevice (void *hashcat_ctx, mtl_device_id metal_device);
|
||||
|
||||
int hc_mtlCreateLibraryWithSource (void *hashcat_ctx, mtl_device_id metal_device, const char *kernel_sources, const char *build_options_buf, const char *include_path, mtl_library *metal_library);
|
||||
int hc_mtlCreateLibraryWithFile (void *hashcat_ctx, mtl_device_id metal_device, const char *cached_file, mtl_library *metal_library);
|
||||
|
||||
int hc_mtlEncodeComputeCommand_pre (void *hashcat_ctx, mtl_pipeline metal_pipeline, mtl_command_queue metal_command_queue, mtl_command_buffer *metal_command_buffer, mtl_command_encoder *metal_command_encoder);
|
||||
int hc_mtlSetCommandEncoderArg (void *hashcat_ctx, mtl_command_encoder metal_command_encoder, size_t off, size_t idx, mtl_mem buf, void *host_data, size_t host_data_size);
|
||||
|
||||
int hc_mtlEncodeComputeCommand (void *hashcat_ctx, mtl_command_encoder metal_command_encoder, mtl_command_buffer metal_command_buffer, size_t global_work_size, size_t local_work_size, double *ms);
|
||||
|
||||
#endif // __APPLE__
|
||||
|
||||
#endif // _EXT_METAL_H
|
298
include/types.h
298
include/types.h
@ -660,6 +660,9 @@ typedef enum user_options_defaults
|
||||
NONCE_ERROR_CORRECTIONS = 8,
|
||||
BACKEND_IGNORE_CUDA = false,
|
||||
BACKEND_IGNORE_HIP = false,
|
||||
#if defined (__APPLE__)
|
||||
BACKEND_IGNORE_METAL = false,
|
||||
#endif
|
||||
BACKEND_IGNORE_OPENCL = false,
|
||||
BACKEND_INFO = false,
|
||||
BACKEND_VECTOR_WIDTH = 0,
|
||||
@ -711,116 +714,117 @@ typedef enum user_options_map
|
||||
IDX_BACKEND_DEVICES = 'd',
|
||||
IDX_BACKEND_IGNORE_CUDA = 0xff01,
|
||||
IDX_BACKEND_IGNORE_HIP = 0xff02,
|
||||
IDX_BACKEND_IGNORE_OPENCL = 0xff03,
|
||||
IDX_BACKEND_IGNORE_METAL = 0xff03,
|
||||
IDX_BACKEND_IGNORE_OPENCL = 0xff04,
|
||||
IDX_BACKEND_INFO = 'I',
|
||||
IDX_BACKEND_VECTOR_WIDTH = 0xff04,
|
||||
IDX_BENCHMARK_ALL = 0xff05,
|
||||
IDX_BACKEND_VECTOR_WIDTH = 0xff05,
|
||||
IDX_BENCHMARK_ALL = 0xff06,
|
||||
IDX_BENCHMARK = 'b',
|
||||
IDX_BITMAP_MAX = 0xff06,
|
||||
IDX_BITMAP_MIN = 0xff07,
|
||||
IDX_BITMAP_MAX = 0xff07,
|
||||
IDX_BITMAP_MIN = 0xff08,
|
||||
#ifdef WITH_BRAIN
|
||||
IDX_BRAIN_CLIENT = 'z',
|
||||
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,
|
||||
IDX_BRAIN_CLIENT_FEATURES = 0xff09,
|
||||
IDX_BRAIN_HOST = 0xff0a,
|
||||
IDX_BRAIN_PASSWORD = 0xff0b,
|
||||
IDX_BRAIN_PORT = 0xff0c,
|
||||
IDX_BRAIN_SERVER = 0xff0d,
|
||||
IDX_BRAIN_SERVER_TIMER = 0xff0e,
|
||||
IDX_BRAIN_SESSION = 0xff0f,
|
||||
IDX_BRAIN_SESSION_WHITELIST = 0xff10,
|
||||
#endif
|
||||
IDX_CPU_AFFINITY = 0xff10,
|
||||
IDX_CPU_AFFINITY = 0xff11,
|
||||
IDX_CUSTOM_CHARSET_1 = '1',
|
||||
IDX_CUSTOM_CHARSET_2 = '2',
|
||||
IDX_CUSTOM_CHARSET_3 = '3',
|
||||
IDX_CUSTOM_CHARSET_4 = '4',
|
||||
IDX_DEBUG_FILE = 0xff11,
|
||||
IDX_DEBUG_MODE = 0xff12,
|
||||
IDX_DEPRECATED_CHECK_DISABLE = 0xff13,
|
||||
IDX_ENCODING_FROM = 0xff14,
|
||||
IDX_ENCODING_TO = 0xff15,
|
||||
IDX_HASH_INFO = 0xff16,
|
||||
IDX_FORCE = 0xff17,
|
||||
IDX_HWMON_DISABLE = 0xff18,
|
||||
IDX_HWMON_TEMP_ABORT = 0xff19,
|
||||
IDX_DEBUG_FILE = 0xff12,
|
||||
IDX_DEBUG_MODE = 0xff13,
|
||||
IDX_DEPRECATED_CHECK_DISABLE = 0xff14,
|
||||
IDX_ENCODING_FROM = 0xff15,
|
||||
IDX_ENCODING_TO = 0xff16,
|
||||
IDX_HASH_INFO = 0xff17,
|
||||
IDX_FORCE = 0xff18,
|
||||
IDX_HWMON_DISABLE = 0xff19,
|
||||
IDX_HWMON_TEMP_ABORT = 0xff1a,
|
||||
IDX_HASH_MODE = 'm',
|
||||
IDX_HCCAPX_MESSAGE_PAIR = 0xff1a,
|
||||
IDX_HCCAPX_MESSAGE_PAIR = 0xff1b,
|
||||
IDX_HELP = 'h',
|
||||
IDX_HEX_CHARSET = 0xff1b,
|
||||
IDX_HEX_SALT = 0xff1c,
|
||||
IDX_HEX_WORDLIST = 0xff1d,
|
||||
IDX_HOOK_THREADS = 0xff1e,
|
||||
IDX_IDENTIFY = 0xff1f,
|
||||
IDX_HEX_CHARSET = 0xff1c,
|
||||
IDX_HEX_SALT = 0xff1d,
|
||||
IDX_HEX_WORDLIST = 0xff1e,
|
||||
IDX_HOOK_THREADS = 0xff1f,
|
||||
IDX_IDENTIFY = 0xff20,
|
||||
IDX_INCREMENT = 'i',
|
||||
IDX_INCREMENT_MAX = 0xff20,
|
||||
IDX_INCREMENT_MIN = 0xff21,
|
||||
IDX_INDUCTION_DIR = 0xff22,
|
||||
IDX_KEEP_GUESSING = 0xff23,
|
||||
IDX_INCREMENT_MAX = 0xff21,
|
||||
IDX_INCREMENT_MIN = 0xff22,
|
||||
IDX_INDUCTION_DIR = 0xff23,
|
||||
IDX_KEEP_GUESSING = 0xff24,
|
||||
IDX_KERNEL_ACCEL = 'n',
|
||||
IDX_KERNEL_LOOPS = 'u',
|
||||
IDX_KERNEL_THREADS = 'T',
|
||||
IDX_KEYBOARD_LAYOUT_MAPPING = 0xff24,
|
||||
IDX_KEYSPACE = 0xff25,
|
||||
IDX_LEFT = 0xff26,
|
||||
IDX_KEYBOARD_LAYOUT_MAPPING = 0xff25,
|
||||
IDX_KEYSPACE = 0xff26,
|
||||
IDX_LEFT = 0xff27,
|
||||
IDX_LIMIT = 'l',
|
||||
IDX_LOGFILE_DISABLE = 0xff27,
|
||||
IDX_LOOPBACK = 0xff28,
|
||||
IDX_MACHINE_READABLE = 0xff29,
|
||||
IDX_MARKOV_CLASSIC = 0xff2a,
|
||||
IDX_MARKOV_DISABLE = 0xff2b,
|
||||
IDX_MARKOV_HCSTAT2 = 0xff2c,
|
||||
IDX_MARKOV_INVERSE = 0xff2d,
|
||||
IDX_LOGFILE_DISABLE = 0xff28,
|
||||
IDX_LOOPBACK = 0xff29,
|
||||
IDX_MACHINE_READABLE = 0xff2a,
|
||||
IDX_MARKOV_CLASSIC = 0xff2b,
|
||||
IDX_MARKOV_DISABLE = 0xff2c,
|
||||
IDX_MARKOV_HCSTAT2 = 0xff2d,
|
||||
IDX_MARKOV_INVERSE = 0xff2e,
|
||||
IDX_MARKOV_THRESHOLD = 't',
|
||||
IDX_NONCE_ERROR_CORRECTIONS = 0xff2e,
|
||||
IDX_NONCE_ERROR_CORRECTIONS = 0xff2f,
|
||||
IDX_OPENCL_DEVICE_TYPES = 'D',
|
||||
IDX_OPTIMIZED_KERNEL_ENABLE = 'O',
|
||||
IDX_MULTIPLY_ACCEL_DISABLE = 'M',
|
||||
IDX_OUTFILE_AUTOHEX_DISABLE = 0xff2f,
|
||||
IDX_OUTFILE_CHECK_DIR = 0xff30,
|
||||
IDX_OUTFILE_CHECK_TIMER = 0xff31,
|
||||
IDX_OUTFILE_FORMAT = 0xff32,
|
||||
IDX_OUTFILE_AUTOHEX_DISABLE = 0xff30,
|
||||
IDX_OUTFILE_CHECK_DIR = 0xff31,
|
||||
IDX_OUTFILE_CHECK_TIMER = 0xff32,
|
||||
IDX_OUTFILE_FORMAT = 0xff33,
|
||||
IDX_OUTFILE = 'o',
|
||||
IDX_POTFILE_DISABLE = 0xff33,
|
||||
IDX_POTFILE_PATH = 0xff34,
|
||||
IDX_PROGRESS_ONLY = 0xff35,
|
||||
IDX_QUIET = 0xff36,
|
||||
IDX_REMOVE = 0xff37,
|
||||
IDX_REMOVE_TIMER = 0xff38,
|
||||
IDX_RESTORE = 0xff39,
|
||||
IDX_RESTORE_DISABLE = 0xff3a,
|
||||
IDX_RESTORE_FILE_PATH = 0xff3b,
|
||||
IDX_POTFILE_DISABLE = 0xff34,
|
||||
IDX_POTFILE_PATH = 0xff35,
|
||||
IDX_PROGRESS_ONLY = 0xff36,
|
||||
IDX_QUIET = 0xff37,
|
||||
IDX_REMOVE = 0xff38,
|
||||
IDX_REMOVE_TIMER = 0xff39,
|
||||
IDX_RESTORE = 0xff3a,
|
||||
IDX_RESTORE_DISABLE = 0xff3b,
|
||||
IDX_RESTORE_FILE_PATH = 0xff3c,
|
||||
IDX_RP_FILE = 'r',
|
||||
IDX_RP_GEN_FUNC_MAX = 0xff3c,
|
||||
IDX_RP_GEN_FUNC_MIN = 0xff3d,
|
||||
IDX_RP_GEN_FUNC_SEL = 0xff3e,
|
||||
IDX_RP_GEN_FUNC_MAX = 0xff3d,
|
||||
IDX_RP_GEN_FUNC_MIN = 0xff3e,
|
||||
IDX_RP_GEN_FUNC_SEL = 0xff3f,
|
||||
IDX_RP_GEN = 'g',
|
||||
IDX_RP_GEN_SEED = 0xff3f,
|
||||
IDX_RP_GEN_SEED = 0xff40,
|
||||
IDX_RULE_BUF_L = 'j',
|
||||
IDX_RULE_BUF_R = 'k',
|
||||
IDX_RUNTIME = 0xff40,
|
||||
IDX_SCRYPT_TMTO = 0xff41,
|
||||
IDX_RUNTIME = 0xff41,
|
||||
IDX_SCRYPT_TMTO = 0xff42,
|
||||
IDX_SEGMENT_SIZE = 'c',
|
||||
IDX_SELF_TEST_DISABLE = 0xff42,
|
||||
IDX_SELF_TEST_DISABLE = 0xff43,
|
||||
IDX_SEPARATOR = 'p',
|
||||
IDX_SESSION = 0xff43,
|
||||
IDX_SHOW = 0xff44,
|
||||
IDX_SESSION = 0xff44,
|
||||
IDX_SHOW = 0xff45,
|
||||
IDX_SKIP = 's',
|
||||
IDX_SLOW_CANDIDATES = 'S',
|
||||
IDX_SPEED_ONLY = 0xff45,
|
||||
IDX_SPIN_DAMP = 0xff46,
|
||||
IDX_STATUS = 0xff47,
|
||||
IDX_STATUS_JSON = 0xff48,
|
||||
IDX_STATUS_TIMER = 0xff49,
|
||||
IDX_STDOUT_FLAG = 0xff4a,
|
||||
IDX_STDIN_TIMEOUT_ABORT = 0xff4b,
|
||||
IDX_TRUECRYPT_KEYFILES = 0xff4c,
|
||||
IDX_USERNAME = 0xff4d,
|
||||
IDX_VERACRYPT_KEYFILES = 0xff4e,
|
||||
IDX_VERACRYPT_PIM_START = 0xff4f,
|
||||
IDX_VERACRYPT_PIM_STOP = 0xff50,
|
||||
IDX_SPEED_ONLY = 0xff46,
|
||||
IDX_SPIN_DAMP = 0xff47,
|
||||
IDX_STATUS = 0xff48,
|
||||
IDX_STATUS_JSON = 0xff49,
|
||||
IDX_STATUS_TIMER = 0xff4a,
|
||||
IDX_STDOUT_FLAG = 0xff4b,
|
||||
IDX_STDIN_TIMEOUT_ABORT = 0xff4c,
|
||||
IDX_TRUECRYPT_KEYFILES = 0xff4d,
|
||||
IDX_USERNAME = 0xff4e,
|
||||
IDX_VERACRYPT_KEYFILES = 0xff4f,
|
||||
IDX_VERACRYPT_PIM_START = 0xff50,
|
||||
IDX_VERACRYPT_PIM_STOP = 0xff51,
|
||||
IDX_VERSION_LOWER = 'v',
|
||||
IDX_VERSION = 'V',
|
||||
IDX_WORDLIST_AUTOHEX_DISABLE = 0xff51,
|
||||
IDX_WORDLIST_AUTOHEX_DISABLE = 0xff52,
|
||||
IDX_WORKLOAD_PROFILE = 'w',
|
||||
|
||||
} user_options_map_t;
|
||||
@ -1100,6 +1104,7 @@ typedef struct hc_fp
|
||||
#include "ext_cuda.h"
|
||||
#include "ext_hip.h"
|
||||
#include "ext_OpenCL.h"
|
||||
#include "ext_metal.h"
|
||||
|
||||
typedef struct hc_device_param
|
||||
{
|
||||
@ -1601,6 +1606,129 @@ typedef struct hc_device_param
|
||||
hipDeviceptr_t hip_d_st_esalts_buf;
|
||||
hipDeviceptr_t hip_d_kernel_param;
|
||||
|
||||
// API: opencl and metal
|
||||
|
||||
bool is_apple_silicon;
|
||||
|
||||
// API: metal
|
||||
|
||||
bool is_metal;
|
||||
|
||||
#if defined (__APPLE__)
|
||||
|
||||
int mtl_major;
|
||||
int mtl_minor;
|
||||
|
||||
int device_physical_location;
|
||||
int device_location_number;
|
||||
int device_registryID;
|
||||
int device_max_transfer_rate;
|
||||
int device_is_headless;
|
||||
int device_is_low_power;
|
||||
int device_is_removable;
|
||||
|
||||
int metal_warp_size;
|
||||
|
||||
mtl_device_id metal_device;
|
||||
mtl_command_queue metal_command_queue;
|
||||
|
||||
mtl_library metal_library;
|
||||
mtl_library metal_library_shared;
|
||||
mtl_library metal_library_mp;
|
||||
mtl_library metal_library_amp;
|
||||
|
||||
mtl_function metal_function1;
|
||||
mtl_function metal_function12;
|
||||
mtl_function metal_function2p;
|
||||
mtl_function metal_function2;
|
||||
mtl_function metal_function2e;
|
||||
mtl_function metal_function23;
|
||||
mtl_function metal_function3;
|
||||
mtl_function metal_function4;
|
||||
mtl_function metal_function_init2;
|
||||
mtl_function metal_function_loop2p;
|
||||
mtl_function metal_function_loop2;
|
||||
mtl_function metal_function_mp;
|
||||
mtl_function metal_function_mp_l;
|
||||
mtl_function metal_function_mp_r;
|
||||
mtl_function metal_function_amp;
|
||||
mtl_function metal_function_tm;
|
||||
mtl_function metal_function_memset;
|
||||
mtl_function metal_function_bzero;
|
||||
mtl_function metal_function_atinit;
|
||||
mtl_function metal_function_utf8toutf16le;
|
||||
mtl_function metal_function_decompress;
|
||||
mtl_function metal_function_aux1;
|
||||
mtl_function metal_function_aux2;
|
||||
mtl_function metal_function_aux3;
|
||||
mtl_function metal_function_aux4;
|
||||
|
||||
mtl_pipeline metal_pipeline1;
|
||||
mtl_pipeline metal_pipeline12;
|
||||
mtl_pipeline metal_pipeline2p;
|
||||
mtl_pipeline metal_pipeline2;
|
||||
mtl_pipeline metal_pipeline2e;
|
||||
mtl_pipeline metal_pipeline23;
|
||||
mtl_pipeline metal_pipeline3;
|
||||
mtl_pipeline metal_pipeline4;
|
||||
mtl_pipeline metal_pipeline_init2;
|
||||
mtl_pipeline metal_pipeline_loop2p;
|
||||
mtl_pipeline metal_pipeline_loop2;
|
||||
mtl_pipeline metal_pipeline_mp;
|
||||
mtl_pipeline metal_pipeline_mp_l;
|
||||
mtl_pipeline metal_pipeline_mp_r;
|
||||
mtl_pipeline metal_pipeline_amp;
|
||||
mtl_pipeline metal_pipeline_tm;
|
||||
mtl_pipeline metal_pipeline_memset;
|
||||
mtl_pipeline metal_pipeline_bzero;
|
||||
mtl_pipeline metal_pipeline_atinit;
|
||||
mtl_pipeline metal_pipeline_utf8toutf16le;
|
||||
mtl_pipeline metal_pipeline_decompress;
|
||||
mtl_pipeline metal_pipeline_aux1;
|
||||
mtl_pipeline metal_pipeline_aux2;
|
||||
mtl_pipeline metal_pipeline_aux3;
|
||||
mtl_pipeline metal_pipeline_aux4;
|
||||
|
||||
mtl_mem metal_d_pws_buf;
|
||||
mtl_mem metal_d_pws_amp_buf;
|
||||
mtl_mem metal_d_pws_comp_buf;
|
||||
mtl_mem metal_d_pws_idx;
|
||||
mtl_mem metal_d_rules;
|
||||
mtl_mem metal_d_rules_c;
|
||||
mtl_mem metal_d_combs;
|
||||
mtl_mem metal_d_combs_c;
|
||||
mtl_mem metal_d_bfs;
|
||||
mtl_mem metal_d_bfs_c;
|
||||
mtl_mem metal_d_tm_c;
|
||||
mtl_mem metal_d_bitmap_s1_a;
|
||||
mtl_mem metal_d_bitmap_s1_b;
|
||||
mtl_mem metal_d_bitmap_s1_c;
|
||||
mtl_mem metal_d_bitmap_s1_d;
|
||||
mtl_mem metal_d_bitmap_s2_a;
|
||||
mtl_mem metal_d_bitmap_s2_b;
|
||||
mtl_mem metal_d_bitmap_s2_c;
|
||||
mtl_mem metal_d_bitmap_s2_d;
|
||||
mtl_mem metal_d_plain_bufs;
|
||||
mtl_mem metal_d_digests_buf;
|
||||
mtl_mem metal_d_digests_shown;
|
||||
mtl_mem metal_d_salt_bufs;
|
||||
mtl_mem metal_d_esalt_bufs;
|
||||
mtl_mem metal_d_tmps;
|
||||
mtl_mem metal_d_hooks;
|
||||
mtl_mem metal_d_result;
|
||||
mtl_mem metal_d_extra0_buf;
|
||||
mtl_mem metal_d_extra1_buf;
|
||||
mtl_mem metal_d_extra2_buf;
|
||||
mtl_mem metal_d_extra3_buf;
|
||||
mtl_mem metal_d_root_css_buf;
|
||||
mtl_mem metal_d_markov_css_buf;
|
||||
mtl_mem metal_d_st_digests_buf;
|
||||
mtl_mem metal_d_st_salts_buf;
|
||||
mtl_mem metal_d_st_esalts_buf;
|
||||
mtl_mem metal_d_kernel_param;
|
||||
|
||||
#endif // __APPLE__
|
||||
|
||||
// API: opencl
|
||||
|
||||
bool is_opencl;
|
||||
@ -1708,6 +1836,7 @@ typedef struct backend_ctx
|
||||
|
||||
void *cuda;
|
||||
void *hip;
|
||||
void *mtl;
|
||||
void *ocl;
|
||||
|
||||
void *nvrtc;
|
||||
@ -1715,6 +1844,7 @@ typedef struct backend_ctx
|
||||
|
||||
int backend_device_from_cuda[DEVICES_MAX]; // from cuda device index to backend device index
|
||||
int backend_device_from_hip[DEVICES_MAX]; // from hip device index to backend device index
|
||||
int backend_device_from_metal[DEVICES_MAX]; // from metal device index to backend device index
|
||||
int backend_device_from_opencl[DEVICES_MAX]; // from opencl device index to backend device index
|
||||
int backend_device_from_opencl_platform[CL_PLATFORMS_MAX][DEVICES_MAX]; // from opencl device index to backend device index (by platform)
|
||||
|
||||
@ -1725,6 +1855,8 @@ typedef struct backend_ctx
|
||||
int cuda_devices_active;
|
||||
int hip_devices_cnt;
|
||||
int hip_devices_active;
|
||||
int metal_devices_cnt;
|
||||
int metal_devices_active;
|
||||
int opencl_devices_cnt;
|
||||
int opencl_devices_active;
|
||||
|
||||
@ -1766,6 +1898,13 @@ typedef struct backend_ctx
|
||||
int hip_runtimeVersion;
|
||||
int hip_driverVersion;
|
||||
|
||||
// metal
|
||||
|
||||
int rc_metal_init;
|
||||
|
||||
unsigned int metal_runtimeVersion;
|
||||
char *metal_runtimeVersionStr;
|
||||
|
||||
// opencl
|
||||
|
||||
cl_platform_id *opencl_platforms;
|
||||
@ -2169,6 +2308,7 @@ typedef struct user_options
|
||||
bool markov_inverse;
|
||||
bool backend_ignore_cuda;
|
||||
bool backend_ignore_hip;
|
||||
bool backend_ignore_metal;
|
||||
bool backend_ignore_opencl;
|
||||
bool backend_info;
|
||||
bool optimized_kernel_enable;
|
||||
|
11
src/Makefile
11
src/Makefile
@ -331,7 +331,11 @@ CFLAGS_NATIVE += -DMISSING_CLOCK_GETTIME
|
||||
endif
|
||||
|
||||
LFLAGS_NATIVE := $(LFLAGS)
|
||||
LFLAGS_NATIVE += -framework CoreFoundation
|
||||
LFLAGS_NATIVE += -framework CoreGraphics
|
||||
LFLAGS_NATIVE += -framework Foundation
|
||||
LFLAGS_NATIVE += -framework IOKit
|
||||
LFLAGS_NATIVE += -framework Metal
|
||||
LFLAGS_NATIVE += -lpthread
|
||||
LFLAGS_NATIVE += -liconv
|
||||
|
||||
@ -385,6 +389,10 @@ EMU_OBJS_ALL += emu_inc_cipher_aes emu_inc_cipher_camellia emu_inc_ci
|
||||
|
||||
OBJS_ALL := affinity autotune backend benchmark bitmap bitops combinator common convert cpt cpu_crc32 debugfile dictstat dispatch dynloader event ext_ADL ext_cuda ext_hip ext_nvapi ext_nvml ext_nvrtc ext_hiprtc ext_OpenCL ext_sysfs_amdgpu ext_sysfs_cpu ext_iokit ext_lzma filehandling folder hashcat hashes hlfmt hwmon induct interface keyboard_layout locking logfile loopback memory monitor mpsp outfile_check outfile pidfile potfile restore rp rp_cpu selftest slow_candidates shared status stdout straight terminal thread timer tuningdb usage user_options wordlist $(EMU_OBJS_ALL)
|
||||
|
||||
ifeq ($(UNAME),Darwin)
|
||||
OBJS_ALL += ext_metal
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_BRAIN),1)
|
||||
OBJS_ALL += brain
|
||||
endif
|
||||
@ -585,6 +593,9 @@ uninstall:
|
||||
obj/%.NATIVE.o: src/%.c
|
||||
$(CC) -c $(CCFLAGS) $(CFLAGS_NATIVE) $< -o $@ -fpic
|
||||
|
||||
obj/%.NATIVE.o: src/%.m
|
||||
$(CC) -c $(CCFLAGS) $(CFLAGS_NATIVE) $< -o $@ -fpic
|
||||
|
||||
ifeq ($(USE_SYSTEM_LZMA),0)
|
||||
obj/%.LZMA.NATIVE.o: $(DEPS_LZMA_PATH)/%.c
|
||||
$(CC) -c $(CCFLAGS) $(CFLAGS_NATIVE) $(CFLAGS_LZMA) $< -o $@ -fpic
|
||||
|
@ -238,6 +238,13 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (run_hip_kernel_atinit (hashcat_ctx, device_param, device_param->hip_d_pws_buf, kernel_power_max) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (run_metal_kernel_atinit (hashcat_ctx, device_param, device_param->metal_d_pws_buf, kernel_power_max) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (run_opencl_kernel_atinit (hashcat_ctx, device_param, device_param->opencl_d_pws_buf, kernel_power_max) == -1) return -1;
|
||||
@ -264,6 +271,13 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipMemcpyDtoDAsync (hashcat_ctx, device_param->hip_d_rules_c, device_param->hip_d_rules, MIN (kernel_loops_max, KERNEL_RULES) * sizeof (kernel_rule_t), device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyDtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_rules_c, 0, device_param->metal_d_rules, 0, MIN (kernel_loops_max, KERNEL_RULES) * sizeof (kernel_rule_t)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueCopyBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_rules, device_param->opencl_d_rules_c, 0, 0, MIN (kernel_loops_max, KERNEL_RULES) * sizeof (kernel_rule_t), 0, NULL, NULL) == -1) return -1;
|
||||
@ -477,6 +491,17 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (run_hip_kernel_bzero (hashcat_ctx, device_param, device_param->hip_d_tmps, device_param->size_tmps) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_pws_buf, device_param->size_pws) == -1) return -1;
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_plain_bufs, device_param->size_plains) == -1) return -1;
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_digests_shown, device_param->size_shown) == -1) return -1;
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_result, device_param->size_results) == -1) return -1;
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_tmps, device_param->size_tmps) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (run_opencl_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_pws_buf, device_param->size_pws) == -1) return -1;
|
||||
|
2806
src/backend.c
2806
src/backend.c
File diff suppressed because it is too large
Load Diff
1416
src/ext_metal.m
Normal file
1416
src/ext_metal.m
Normal file
File diff suppressed because it is too large
Load Diff
54
src/hashes.c
54
src/hashes.c
@ -355,6 +355,20 @@ int check_hash (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, pla
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
rc = hc_mtlMemcpyDtoH (hashcat_ctx, device_param->metal_command_queue, tmps, device_param->metal_d_tmps, plain->gidvid * hashconfig->tmp_size, hashconfig->tmp_size);
|
||||
|
||||
if (rc == -1)
|
||||
{
|
||||
hcfree (tmps);
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
rc = hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_tmps, CL_FALSE, plain->gidvid * hashconfig->tmp_size, hashconfig->tmp_size, tmps, 0, NULL, &opencl_event);
|
||||
@ -574,6 +588,13 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
||||
if (hc_hipStreamSynchronize (hashcat_ctx, device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyDtoH (hashcat_ctx, device_param->metal_command_queue, &num_cracked, device_param->metal_d_result, 0, sizeof (u32)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
/* blocking */
|
||||
@ -624,6 +645,20 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
rc = hc_mtlMemcpyDtoH (hashcat_ctx, device_param->metal_command_queue, cracked, device_param->metal_d_plain_bufs, 0, num_cracked * sizeof (plain_t));
|
||||
|
||||
if (rc == -1)
|
||||
{
|
||||
hcfree (cracked);
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
/* blocking */
|
||||
@ -703,6 +738,18 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
rc = run_metal_kernel_memset32 (hashcat_ctx, device_param, device_param->metal_d_digests_shown, salt_buf->digests_offset * sizeof (u32), 0, salt_buf->digests_cnt * sizeof (u32));
|
||||
|
||||
if (rc == -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
/* NOTE: run_opencl_kernel_bzero() does not handle buffer offset */
|
||||
@ -751,6 +798,13 @@ int check_cracked (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
|
||||
if (run_hip_kernel_bzero (hashcat_ctx, device_param, device_param->hip_d_result, sizeof (u32)) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_result, sizeof (u32)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (run_opencl_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_result, sizeof (u32)) == -1) return -1;
|
||||
|
@ -151,7 +151,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
{
|
||||
if ((user_options->attack_mode == ATTACK_MODE_BF) && (hashes->salts_cnt == 1) && (user_options->slow_candidates == false))
|
||||
{
|
||||
hc_asprintf (&jit_build_options, "-DDESCRYPT_SALT=%u", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
hc_asprintf (&jit_build_options, "-D DESCRYPT_SALT=%u", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
}
|
||||
|
||||
return jit_build_options;
|
||||
@ -161,7 +161,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
{
|
||||
if ((user_options->attack_mode == ATTACK_MODE_BF) && (hashes->salts_cnt == 1) && (user_options->slow_candidates == false))
|
||||
{
|
||||
hc_asprintf (&jit_build_options, "-DDESCRYPT_SALT=%u -D _unroll", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
hc_asprintf (&jit_build_options, "-D DESCRYPT_SALT=%u -D _unroll", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
}
|
||||
}
|
||||
// ROCM
|
||||
@ -169,7 +169,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
{
|
||||
if ((user_options->attack_mode == ATTACK_MODE_BF) && (hashes->salts_cnt == 1) && (user_options->slow_candidates == false))
|
||||
{
|
||||
hc_asprintf (&jit_build_options, "-DDESCRYPT_SALT=%u -D _unroll", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
hc_asprintf (&jit_build_options, "-D DESCRYPT_SALT=%u -D _unroll", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
}
|
||||
}
|
||||
// ROCM
|
||||
@ -177,7 +177,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
{
|
||||
if ((user_options->attack_mode == ATTACK_MODE_BF) && (hashes->salts_cnt == 1) && (user_options->slow_candidates == false))
|
||||
{
|
||||
hc_asprintf (&jit_build_options, "-DDESCRYPT_SALT=%u -D _unroll -fno-experimental-new-pass-manager", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
hc_asprintf (&jit_build_options, "-D DESCRYPT_SALT=%u -D _unroll -fno-experimental-new-pass-manager", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -188,7 +188,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
{
|
||||
if ((user_options->attack_mode == ATTACK_MODE_BF) && (hashes->salts_cnt == 1) && (user_options->slow_candidates == false))
|
||||
{
|
||||
hc_asprintf (&jit_build_options, "-DDESCRYPT_SALT=%u", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
hc_asprintf (&jit_build_options, "-D DESCRYPT_SALT=%u", hashes->salts_buf[0].salt_buf[0] & 0xfff);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -77,7 +77,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -77,7 +77,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -78,7 +78,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -78,7 +78,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -78,7 +78,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -56,7 +56,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -56,7 +56,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// amdgpu-pro-20.50-1234664-ubuntu-20.04 (legacy)
|
||||
@ -266,7 +269,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
|
||||
char *jit_build_options = NULL;
|
||||
|
||||
hc_asprintf (&jit_build_options, "-DSCRYPT_N=%u -DSCRYPT_R=%u -DSCRYPT_P=%u -DSCRYPT_TMTO=%" PRIu64 " -DSCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hc_asprintf (&jit_build_options, "-D SCRYPT_N=%u -D SCRYPT_R=%u -D SCRYPT_P=%u -D SCRYPT_TMTO=%" PRIu64 " -D SCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hashes->salts_buf[0].scrypt_N,
|
||||
hashes->salts_buf[0].scrypt_r,
|
||||
hashes->salts_buf[0].scrypt_p,
|
||||
|
@ -56,7 +56,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -258,7 +261,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
|
||||
char *jit_build_options = NULL;
|
||||
|
||||
hc_asprintf (&jit_build_options, "-DSCRYPT_N=%u -DSCRYPT_R=%u -DSCRYPT_P=%u -DSCRYPT_TMTO=%" PRIu64 " -DSCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hc_asprintf (&jit_build_options, "-D SCRYPT_N=%u -D SCRYPT_R=%u -D SCRYPT_P=%u -D SCRYPT_TMTO=%" PRIu64 " -D SCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hashes->salts_buf[0].scrypt_N,
|
||||
hashes->salts_buf[0].scrypt_r,
|
||||
hashes->salts_buf[0].scrypt_p,
|
||||
|
@ -62,7 +62,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -65,7 +65,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -60,7 +60,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -88,7 +88,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -88,7 +88,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -88,7 +88,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -89,7 +89,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
|
||||
|
@ -89,7 +89,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
|
||||
|
@ -89,7 +89,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
|
||||
|
@ -89,7 +89,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AppleM1, OpenCL, MTLCompilerService never-end (pure/optimized kernel)
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -89,7 +89,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -89,7 +89,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -89,7 +89,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -88,7 +88,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -88,7 +88,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -88,7 +88,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -89,7 +89,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -89,7 +89,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -89,7 +89,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -66,7 +66,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -56,7 +56,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -279,7 +279,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
|
||||
char *jit_build_options = NULL;
|
||||
|
||||
hc_asprintf (&jit_build_options, "-DSCRYPT_N=%u -DSCRYPT_R=%u -DSCRYPT_P=%u -DSCRYPT_TMTO=%" PRIu64 " -DSCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hc_asprintf (&jit_build_options, "-D SCRYPT_N=%u -D SCRYPT_R=%u -D SCRYPT_P=%u -D SCRYPT_TMTO=%" PRIu64 " -D SCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hashes->salts_buf[0].scrypt_N,
|
||||
hashes->salts_buf[0].scrypt_r,
|
||||
hashes->salts_buf[0].scrypt_p,
|
||||
|
@ -71,7 +71,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -71,7 +71,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -71,7 +71,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -71,7 +71,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -71,7 +71,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -68,7 +68,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -68,7 +68,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -68,7 +68,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -266,7 +266,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
|
||||
char *jit_build_options = NULL;
|
||||
|
||||
hc_asprintf (&jit_build_options, "-DSCRYPT_N=%u -DSCRYPT_R=%u -DSCRYPT_P=%u -DSCRYPT_TMTO=%" PRIu64 " -DSCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hc_asprintf (&jit_build_options, "-D SCRYPT_N=%u -D SCRYPT_R=%u -D SCRYPT_P=%u -D SCRYPT_TMTO=%" PRIu64 " -D SCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hashes->salts_buf[0].scrypt_N,
|
||||
hashes->salts_buf[0].scrypt_r,
|
||||
hashes->salts_buf[0].scrypt_p,
|
||||
|
@ -67,7 +67,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -68,7 +68,10 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
|
||||
// AMD Radeon Pro W5700X Compute Engine; 1.2 (Apr 22 2021 21:54:44); 11.3.1; 20E241
|
||||
if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
|
||||
{
|
||||
return true;
|
||||
if (device_param->is_metal == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -264,7 +264,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
|
||||
char *jit_build_options = NULL;
|
||||
|
||||
hc_asprintf (&jit_build_options, "-DSCRYPT_N=%u -DSCRYPT_R=%u -DSCRYPT_P=%u -DSCRYPT_TMTO=%" PRIu64 " -DSCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hc_asprintf (&jit_build_options, "-D SCRYPT_N=%u -D SCRYPT_R=%u -D SCRYPT_P=%u -D SCRYPT_TMTO=%" PRIu64 " -D SCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hashes->salts_buf[0].scrypt_N,
|
||||
hashes->salts_buf[0].scrypt_r,
|
||||
hashes->salts_buf[0].scrypt_p,
|
||||
|
@ -258,7 +258,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
||||
|
||||
char *jit_build_options = NULL;
|
||||
|
||||
hc_asprintf (&jit_build_options, "-DSCRYPT_N=%u -DSCRYPT_R=%u -DSCRYPT_P=%u -DSCRYPT_TMTO=%" PRIu64 " -DSCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hc_asprintf (&jit_build_options, "-D SCRYPT_N=%u -D SCRYPT_R=%u -D SCRYPT_P=%u -D SCRYPT_TMTO=%" PRIu64 " -D SCRYPT_TMP_ELEM=%" PRIu64,
|
||||
hashes->salts_buf[0].scrypt_N,
|
||||
hashes->salts_buf[0].scrypt_r,
|
||||
hashes->salts_buf[0].scrypt_p,
|
||||
|
153
src/selftest.c
153
src/selftest.c
@ -39,6 +39,15 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
device_param->kernel_params[18] = &device_param->hip_d_st_esalts_buf;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
device_param->kernel_params[15] = device_param->metal_d_st_digests_buf;
|
||||
device_param->kernel_params[17] = device_param->metal_d_st_salts_buf;
|
||||
device_param->kernel_params[18] = device_param->metal_d_st_esalts_buf;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
device_param->kernel_params[15] = &device_param->opencl_d_st_digests_buf;
|
||||
@ -105,6 +114,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipMemcpyHtoDAsync (hashcat_ctx, device_param->hip_d_pws_buf, &pw, 1 * sizeof (pw_t), device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyHtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_pws_buf, 0, &pw, 1 * sizeof (pw_t)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_FALSE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL) == -1) return -1;
|
||||
@ -143,6 +159,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipMemcpyHtoDAsync (hashcat_ctx, device_param->hip_d_pws_buf, &pw, 1 * sizeof (pw_t), device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyHtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_pws_buf, 0, &pw, 1 * sizeof (pw_t)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_FALSE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL) == -1) return -1;
|
||||
@ -210,6 +233,15 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipMemcpyHtoDAsync (hashcat_ctx, device_param->hip_d_pws_buf, &pw, 1 * sizeof (pw_t), device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyHtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_combs_c, 0, &comb, 1 * sizeof (pw_t)) == -1) return -1;
|
||||
|
||||
if (hc_mtlMemcpyHtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_pws_buf, 0, &pw, 1 * sizeof (pw_t)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_combs_c, CL_FALSE, 0, 1 * sizeof (pw_t), &comb, 0, NULL, NULL) == -1) return -1;
|
||||
@ -248,6 +280,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipMemcpyHtoDAsync (hashcat_ctx, device_param->hip_d_pws_buf, &pw, 1 * sizeof (pw_t), device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyHtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_pws_buf, 0, &pw, 1 * sizeof (pw_t)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_FALSE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL) == -1) return -1;
|
||||
@ -302,6 +341,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipMemcpyHtoDAsync (hashcat_ctx, device_param->hip_d_bfs_c, &bf, 1 * sizeof (bf_t), device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyHtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_bfs_c, 0, &bf, 1 * sizeof (bf_t)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_bfs_c, CL_FALSE, 0, 1 * sizeof (bf_t), &bf, 0, NULL, NULL) == -1) return -1;
|
||||
@ -401,6 +447,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipMemcpyHtoDAsync (hashcat_ctx, device_param->hip_d_pws_buf, &pw, 1 * sizeof (pw_t), device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyHtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_pws_buf, 0, &pw, 1 * sizeof (pw_t)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_FALSE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL) == -1) return -1;
|
||||
@ -432,6 +485,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipMemcpyHtoDAsync (hashcat_ctx, device_param->hip_d_pws_buf, &pw, 1 * sizeof (pw_t), device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyHtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_pws_buf, 0, &pw, 1 * sizeof (pw_t)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_pws_buf, CL_FALSE, 0, 1 * sizeof (pw_t), &pw, 0, NULL, NULL) == -1) return -1;
|
||||
@ -487,6 +547,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (run_hip_kernel_utf8toutf16le (hashcat_ctx, device_param, device_param->hip_d_pws_buf, 1) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (run_metal_kernel_utf8toutf16le (hashcat_ctx, device_param, device_param->metal_d_pws_buf, 1) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (run_opencl_kernel_utf8toutf16le (hashcat_ctx, device_param, device_param->opencl_d_pws_buf, 1) == -1) return -1;
|
||||
@ -513,6 +580,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipStreamSynchronize (hashcat_ctx, device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyDtoH (hashcat_ctx, device_param->metal_command_queue, device_param->hooks_buf, device_param->metal_d_hooks, 0, device_param->size_hooks) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
/* blocking */
|
||||
@ -531,6 +605,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipMemcpyHtoDAsync (hashcat_ctx, device_param->hip_d_hooks, device_param->hooks_buf, device_param->size_hooks, device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyHtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_hooks, 0, device_param->hooks_buf, device_param->size_hooks) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_hooks, CL_FALSE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL) == -1) return -1;
|
||||
@ -591,6 +672,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipStreamSynchronize (hashcat_ctx, device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyDtoH (hashcat_ctx, device_param->metal_command_queue, device_param->hooks_buf, device_param->metal_d_hooks, 0, device_param->size_hooks) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
/* blocking */
|
||||
@ -609,6 +697,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipMemcpyHtoDAsync (hashcat_ctx, device_param->hip_d_hooks, device_param->hooks_buf, device_param->size_hooks, device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyHtoD (hashcat_ctx, device_param->metal_command_queue, device_param->metal_d_hooks, 0, device_param->hooks_buf, device_param->size_hooks) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_hooks, CL_FALSE, 0, device_param->size_hooks, device_param->hooks_buf, 0, NULL, NULL) == -1) return -1;
|
||||
@ -701,6 +796,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (hc_hipEventRecord (hashcat_ctx, device_param->hip_event3, device_param->hip_stream) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (hc_mtlMemcpyDtoH (hashcat_ctx, device_param->metal_command_queue, &num_cracked, device_param->metal_d_result, 0, sizeof (u32)) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (hc_clEnqueueReadBuffer (hashcat_ctx, device_param->opencl_command_queue, device_param->opencl_d_result, CL_FALSE, 0, sizeof (u32), &num_cracked, 0, NULL, &opencl_event) == -1) return -1;
|
||||
@ -747,6 +849,22 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (run_hip_kernel_bzero (hashcat_ctx, device_param, device_param->hip_d_result, device_param->size_results) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
device_param->kernel_params[15] = device_param->metal_d_digests_buf;
|
||||
device_param->kernel_params[17] = device_param->metal_d_salt_bufs;
|
||||
device_param->kernel_params[18] = device_param->metal_d_esalt_bufs;
|
||||
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_pws_buf, device_param->size_pws) == -1) return -1;
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_tmps, device_param->size_tmps) == -1) return -1;
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_hooks, device_param->size_hooks) == -1) return -1;
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_plain_bufs, device_param->size_plains) == -1) return -1;
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_digests_shown, device_param->size_shown) == -1) return -1;
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_result, device_param->size_results) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
device_param->kernel_params[15] = &device_param->opencl_d_digests_buf;
|
||||
@ -773,6 +891,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (run_hip_kernel_bzero (hashcat_ctx, device_param, device_param->hip_d_rules_c, device_param->size_rules_c) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_rules_c, device_param->size_rules_c) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (run_opencl_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_rules_c, device_param->size_rules_c) == -1) return -1;
|
||||
@ -792,6 +917,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (run_hip_kernel_bzero (hashcat_ctx, device_param, device_param->hip_d_rules_c, device_param->size_rules_c) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_rules_c, device_param->size_rules_c) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (run_opencl_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_rules_c, device_param->size_rules_c) == -1) return -1;
|
||||
@ -809,6 +941,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (run_hip_kernel_bzero (hashcat_ctx, device_param, device_param->hip_d_combs_c, device_param->size_combs) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_combs_c, device_param->size_combs) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (run_opencl_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_combs_c, device_param->size_combs) == -1) return -1;
|
||||
@ -826,6 +965,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
if (run_hip_kernel_bzero (hashcat_ctx, device_param, device_param->hip_d_bfs_c, device_param->size_bfs) == -1) return -1;
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
if (run_metal_kernel_bzero (hashcat_ctx, device_param, device_param->metal_d_bfs_c, device_param->size_bfs) == -1) return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
if (run_opencl_kernel_bzero (hashcat_ctx, device_param, device_param->opencl_d_bfs_c, device_param->size_bfs) == -1) return -1;
|
||||
@ -866,6 +1012,13 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
||||
event_log_error (hashcat_ctx, "* Device #%u: ATTENTION! HIP kernel self-test failed.", device_param->device_id + 1);
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (device_param->is_metal == true)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "* Device #%u: ATTENTION! Metal kernel self-test failed.", device_param->device_id + 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (device_param->is_opencl == true)
|
||||
{
|
||||
event_log_error (hashcat_ctx, "* Device #%u: ATTENTION! OpenCL kernel self-test failed.", device_param->device_id + 1);
|
||||
|
159
src/terminal.c
159
src/terminal.c
@ -972,6 +972,112 @@ void backend_info (hashcat_ctx_t *hashcat_ctx)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
if (backend_ctx->mtl)
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Metal Info:");
|
||||
event_log_info (hashcat_ctx, "===========");
|
||||
event_log_info (hashcat_ctx, NULL);
|
||||
|
||||
int metal_devices_cnt = backend_ctx->metal_devices_cnt;
|
||||
int metal_runtimeVersion = backend_ctx->metal_runtimeVersion;
|
||||
char *metal_runtimeVersionStr = backend_ctx->metal_runtimeVersionStr;
|
||||
|
||||
if (metal_runtimeVersionStr != NULL)
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Metal.Version.: %s", metal_runtimeVersionStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Metal.Version.: %d", metal_runtimeVersion);
|
||||
}
|
||||
|
||||
event_log_info (hashcat_ctx, NULL);
|
||||
|
||||
for (int metal_devices_idx = 0; metal_devices_idx < metal_devices_cnt; metal_devices_idx++)
|
||||
{
|
||||
const int backend_devices_idx = backend_ctx->backend_device_from_metal[metal_devices_idx];
|
||||
|
||||
const hc_device_param_t *device_param = backend_ctx->devices_param + backend_devices_idx;
|
||||
|
||||
int device_id = device_param->device_id;
|
||||
int device_mtl_maj = device_param->mtl_major;
|
||||
int device_mtl_min = device_param->mtl_minor;
|
||||
int device_max_transfer_rate = device_param->device_max_transfer_rate;
|
||||
int device_physical_location = device_param->device_physical_location;
|
||||
int device_location_number = device_param->device_location_number;
|
||||
int device_registryID = device_param->device_registryID;
|
||||
int device_is_headless = device_param->device_is_headless;
|
||||
int device_is_low_power = device_param->device_is_low_power;
|
||||
int device_is_removable = device_param->device_is_removable;
|
||||
|
||||
char *device_name = device_param->device_name;
|
||||
|
||||
u32 device_processors = device_param->device_processors;
|
||||
|
||||
u64 device_global_mem = device_param->device_global_mem;
|
||||
u64 device_maxmem_alloc = device_param->device_maxmem_alloc;
|
||||
u64 device_available_mem = device_param->device_available_mem;
|
||||
u64 device_local_mem_size = device_param->device_local_mem_size;
|
||||
|
||||
cl_device_type opencl_device_type = device_param->opencl_device_type;
|
||||
cl_uint opencl_device_vendor_id = device_param->opencl_device_vendor_id;
|
||||
char *opencl_device_vendor = device_param->opencl_device_vendor;
|
||||
|
||||
if (device_param->device_id_alias_cnt)
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Backend Device ID #%d (Alias: #%d)", device_id + 1, device_param->device_id_alias_buf[0] + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
event_log_info (hashcat_ctx, "Backend Device ID #%d", device_id + 1);
|
||||
}
|
||||
|
||||
event_log_info (hashcat_ctx, " Type...........: %s", ((opencl_device_type & CL_DEVICE_TYPE_CPU) ? "CPU" : ((opencl_device_type & CL_DEVICE_TYPE_GPU) ? "GPU" : "Accelerator")));
|
||||
event_log_info (hashcat_ctx, " Vendor.ID......: %u", opencl_device_vendor_id);
|
||||
event_log_info (hashcat_ctx, " Vendor.........: %s", opencl_device_vendor);
|
||||
event_log_info (hashcat_ctx, " Name...........: %s", device_name);
|
||||
event_log_info (hashcat_ctx, " Processor(s)...: %u", device_processors);
|
||||
event_log_info (hashcat_ctx, " Clock..........: N/A");
|
||||
event_log_info (hashcat_ctx, " Memory.Total...: %" PRIu64 " MB (limited to %" PRIu64 " MB allocatable in one block)", device_global_mem / 1024 / 1024, device_maxmem_alloc / 1024 / 1024);
|
||||
event_log_info (hashcat_ctx, " Memory.Free....: %" PRIu64 " MB", device_available_mem / 1024 / 1024);
|
||||
event_log_info (hashcat_ctx, " Local.Memory...: %" PRIu64 " KB", device_local_mem_size / 1024);
|
||||
|
||||
switch (device_physical_location)
|
||||
{
|
||||
case MTL_DEVICE_LOCATION_BUILTIN: event_log_info (hashcat_ctx, " Phys.Location..: built-in"); break;
|
||||
case MTL_DEVICE_LOCATION_SLOT: event_log_info (hashcat_ctx, " Phys.Location..: connected to slot %d", device_location_number); break;
|
||||
case MTL_DEVICE_LOCATION_EXTERNAL: event_log_info (hashcat_ctx, " Phys.Location..: connected via an external interface (port %d)", device_location_number); break;
|
||||
case MTL_DEVICE_LOCATION_UNSPECIFIED: event_log_info (hashcat_ctx, " Phys.Location..: unspecified"); break;
|
||||
default: event_log_info (hashcat_ctx, " Phys.Location..: N/A"); break;
|
||||
}
|
||||
|
||||
if (device_mtl_maj > 0 && device_mtl_min > 0)
|
||||
{
|
||||
event_log_info (hashcat_ctx, " Feature.Set....: macOS GPU Family %d v%d", device_mtl_maj, device_mtl_min);
|
||||
}
|
||||
else
|
||||
{
|
||||
event_log_info (hashcat_ctx, " Feature.Set....: N/A");
|
||||
}
|
||||
|
||||
event_log_info (hashcat_ctx, " Registry.ID....: %d", device_registryID);
|
||||
|
||||
if (device_physical_location != MTL_DEVICE_LOCATION_BUILTIN)
|
||||
{
|
||||
event_log_info (hashcat_ctx, " Max.TX.Rate....: %d MB/sec", device_max_transfer_rate);
|
||||
}
|
||||
else
|
||||
{
|
||||
event_log_info (hashcat_ctx, " Max.TX.Rate....: N/A");
|
||||
}
|
||||
|
||||
event_log_info (hashcat_ctx, " GPU.Properties.: headless %d, low-power %d, removable %d", device_is_headless, device_is_low_power, device_is_removable);
|
||||
event_log_info (hashcat_ctx, NULL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (backend_ctx->ocl)
|
||||
{
|
||||
event_log_info (hashcat_ctx, "OpenCL Info:");
|
||||
@ -1187,6 +1293,59 @@ void backend_info_compact (hashcat_ctx_t *hashcat_ctx)
|
||||
event_log_info (hashcat_ctx, NULL);
|
||||
}
|
||||
|
||||
#if defined (__APPLE__)
|
||||
/**
|
||||
* Metal
|
||||
*/
|
||||
|
||||
if (backend_ctx->mtl)
|
||||
{
|
||||
int metal_devices_cnt = backend_ctx->metal_devices_cnt;
|
||||
char *metal_runtimeVersionStr = backend_ctx->metal_runtimeVersionStr;
|
||||
|
||||
size_t len = event_log_info (hashcat_ctx, "METAL API (Metal %s)", metal_runtimeVersionStr);
|
||||
|
||||
char line[HCBUFSIZ_TINY] = { 0 };
|
||||
|
||||
memset (line, '=', len);
|
||||
|
||||
line[len] = 0;
|
||||
|
||||
event_log_info (hashcat_ctx, "%s", line);
|
||||
|
||||
for (int metal_devices_idx = 0; metal_devices_idx < metal_devices_cnt; metal_devices_idx++)
|
||||
{
|
||||
const int backend_devices_idx = backend_ctx->backend_device_from_metal[metal_devices_idx];
|
||||
|
||||
const hc_device_param_t *device_param = backend_ctx->devices_param + backend_devices_idx;
|
||||
|
||||
int device_id = device_param->device_id;
|
||||
char *device_name = device_param->device_name;
|
||||
u32 device_processors = device_param->device_processors;
|
||||
u64 device_global_mem = device_param->device_global_mem;
|
||||
u64 device_available_mem = device_param->device_available_mem;
|
||||
|
||||
if ((device_param->skipped == false) && (device_param->skipped_warning == false))
|
||||
{
|
||||
event_log_info (hashcat_ctx, "* Device #%u: %s, %" PRIu64 "/%" PRIu64 " MB, %uMCU",
|
||||
device_id + 1,
|
||||
device_name,
|
||||
device_available_mem / 1024 / 1024,
|
||||
device_global_mem / 1024 / 1024,
|
||||
device_processors);
|
||||
}
|
||||
else
|
||||
{
|
||||
event_log_info (hashcat_ctx, "* Device #%u: %s, skipped",
|
||||
device_id + 1,
|
||||
device_name);
|
||||
}
|
||||
}
|
||||
|
||||
event_log_info (hashcat_ctx, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* OpenCL
|
||||
*/
|
||||
|
@ -95,6 +95,7 @@ static const char *const USAGE_BIG_PRE_HASHMODES[] =
|
||||
" --example-hashes | | Alias of --hash-info |",
|
||||
" --backend-ignore-cuda | | Do not try to open CUDA interface on startup |",
|
||||
" --backend-ignore-hip | | Do not try to open HIP interface on startup |",
|
||||
" --backend-ignore-metal | | Do not try to open Metal interface on startup |",
|
||||
" --backend-ignore-opencl | | Do not try to open OpenCL interface on startup |",
|
||||
" -I, --backend-info | | Show info about detected backend API devices | -I",
|
||||
" -d, --backend-devices | Str | Backend devices to use, separated with commas | -d 1",
|
||||
|
@ -35,6 +35,9 @@ static const struct option long_options[] =
|
||||
{"backend-devices", required_argument, NULL, IDX_BACKEND_DEVICES},
|
||||
{"backend-ignore-cuda", no_argument, NULL, IDX_BACKEND_IGNORE_CUDA},
|
||||
{"backend-ignore-hip", no_argument, NULL, IDX_BACKEND_IGNORE_HIP},
|
||||
#if defined (__APPLE__)
|
||||
{"backend-ignore-metal", no_argument, NULL, IDX_BACKEND_IGNORE_METAL},
|
||||
#endif
|
||||
{"backend-ignore-opencl", no_argument, NULL, IDX_BACKEND_IGNORE_OPENCL},
|
||||
{"backend-info", no_argument, NULL, IDX_BACKEND_INFO},
|
||||
{"backend-vector-width", required_argument, NULL, IDX_BACKEND_VECTOR_WIDTH},
|
||||
@ -170,6 +173,9 @@ int user_options_init (hashcat_ctx_t *hashcat_ctx)
|
||||
user_options->backend_devices = NULL;
|
||||
user_options->backend_ignore_cuda = BACKEND_IGNORE_CUDA;
|
||||
user_options->backend_ignore_hip = BACKEND_IGNORE_HIP;
|
||||
#if defined (__APPLE__)
|
||||
user_options->backend_ignore_metal = BACKEND_IGNORE_METAL;
|
||||
#endif
|
||||
user_options->backend_ignore_opencl = BACKEND_IGNORE_OPENCL;
|
||||
user_options->backend_info = BACKEND_INFO;
|
||||
user_options->backend_vector_width = BACKEND_VECTOR_WIDTH;
|
||||
@ -455,6 +461,9 @@ int user_options_getopt (hashcat_ctx_t *hashcat_ctx, int argc, char **argv)
|
||||
case IDX_CPU_AFFINITY: user_options->cpu_affinity = optarg; break;
|
||||
case IDX_BACKEND_IGNORE_CUDA: user_options->backend_ignore_cuda = true; break;
|
||||
case IDX_BACKEND_IGNORE_HIP: user_options->backend_ignore_hip = true; break;
|
||||
#if defined (__APPLE__)
|
||||
case IDX_BACKEND_IGNORE_METAL: user_options->backend_ignore_metal = true; break;
|
||||
#endif
|
||||
case IDX_BACKEND_IGNORE_OPENCL: user_options->backend_ignore_opencl = true; break;
|
||||
case IDX_BACKEND_INFO: user_options->backend_info = true; break;
|
||||
case IDX_BACKEND_DEVICES: user_options->backend_devices = optarg; break;
|
||||
|
Loading…
Reference in New Issue
Block a user