mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-21 23:58:07 +00:00
OpenCL Backend: Use CL_DEVICE_BOARD_NAME_AMD instead of CL_DEVICE_NAME for device name in case OpenCL runtime supports this query
This commit is contained in:
parent
5c3a91565e
commit
9f5a22a3ab
@ -16,6 +16,7 @@
|
||||
##
|
||||
|
||||
- CUDA Backend: Do not warn about missing CUDA SDK installation if --stdout is used
|
||||
- OpenCL Backend: Use CL_DEVICE_BOARD_NAME_AMD instead of CL_DEVICE_NAME for device name in case OpenCL runtime supports this query
|
||||
- Performance Monitor: Add -S as a user suggestion to improve cracking performance in specific attack configurations
|
||||
- Status Screen: Show currently running kernel type (pure, optimized) and generator type (host, device)
|
||||
- UTF8-to-UTF16: Replaced naive UTF8 to UTF16 conversion with true conversion for RAR3, AES Crypt, MultiBit HD (scrypt) and Umbraco HMAC-SHA1
|
||||
|
@ -499,13 +499,13 @@ GeForce_RTX_2080_Ti * 15700 1 68
|
||||
GeForce_RTX_2080_Ti * 22700 1 68 A
|
||||
|
||||
## 8GB
|
||||
gfx900 * 8900 1 28 A
|
||||
gfx900 * 9300 1 442 A
|
||||
gfx900 * 15700 1 28 A
|
||||
gfx900 * 22700 1 28 A
|
||||
Vega_10_XL/XT_[Radeon_RX_Vega_56/64] * 8900 1 28 A
|
||||
Vega_10_XL/XT_[Radeon_RX_Vega_56/64] * 9300 1 442 A
|
||||
Vega_10_XL/XT_[Radeon_RX_Vega_56/64] * 15700 1 28 A
|
||||
Vega_10_XL/XT_[Radeon_RX_Vega_56/64] * 22700 1 28 A
|
||||
|
||||
## 4GB
|
||||
Ellesmere * 8900 1 14 A
|
||||
Ellesmere * 9300 1 126 A
|
||||
Ellesmere * 15700 1 14 A
|
||||
Ellesmere * 22700 1 14 A
|
||||
AMD_Radeon_(TM)_RX_480_Graphics * 8900 1 14 A
|
||||
AMD_Radeon_(TM)_RX_480_Graphics * 9300 1 126 A
|
||||
AMD_Radeon_(TM)_RX_480_Graphics * 15700 1 14 A
|
||||
AMD_Radeon_(TM)_RX_480_Graphics * 22700 1 14 A
|
||||
|
@ -28,6 +28,7 @@
|
||||
// AMD extras
|
||||
|
||||
#define CL_DEVICE_TOPOLOGY_AMD 0x4037
|
||||
#define CL_DEVICE_BOARD_NAME_AMD 0x4038
|
||||
|
||||
typedef union
|
||||
{
|
||||
|
@ -6057,21 +6057,58 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
|
||||
|
||||
// device_name
|
||||
|
||||
if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NAME, 0, NULL, ¶m_value_size) == -1)
|
||||
// try CL_DEVICE_BOARD_NAME_AMD first, if it fails fall back to CL_DEVICE_NAME
|
||||
// since AMD ROCm does not identify itself at this stage we simply check for return code from clGetDeviceInfo()
|
||||
|
||||
#define CHECK_BOARD_NAME_AMD 1
|
||||
|
||||
cl_int rc_board_name_amd = 0;
|
||||
|
||||
if (CHECK_BOARD_NAME_AMD)
|
||||
{
|
||||
device_param->skipped = true;
|
||||
continue;
|
||||
backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
|
||||
|
||||
OCL_PTR *ocl = (OCL_PTR *) backend_ctx->ocl;
|
||||
|
||||
rc_board_name_amd = ocl->clGetDeviceInfo (device_param->opencl_device, CL_DEVICE_BOARD_NAME_AMD, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
char *device_name = (char *) hcmalloc (param_value_size);
|
||||
|
||||
if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NAME, param_value_size, device_name, NULL) == -1)
|
||||
if (rc_board_name_amd == CL_SUCCESS)
|
||||
{
|
||||
device_param->skipped = true;
|
||||
continue;
|
||||
}
|
||||
if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_BOARD_NAME_AMD, 0, NULL, ¶m_value_size) == -1)
|
||||
{
|
||||
device_param->skipped = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
device_param->device_name = device_name;
|
||||
char *device_name = (char *) hcmalloc (param_value_size);
|
||||
|
||||
if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_BOARD_NAME_AMD, param_value_size, device_name, NULL) == -1)
|
||||
{
|
||||
device_param->skipped = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
device_param->device_name = device_name;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NAME, 0, NULL, ¶m_value_size) == -1)
|
||||
{
|
||||
device_param->skipped = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
char *device_name = (char *) hcmalloc (param_value_size);
|
||||
|
||||
if (hc_clGetDeviceInfo (hashcat_ctx, device_param->opencl_device, CL_DEVICE_NAME, param_value_size, device_name, NULL) == -1)
|
||||
{
|
||||
device_param->skipped = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
device_param->device_name = device_name;
|
||||
}
|
||||
|
||||
hc_string_trim_leading (device_param->device_name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user