1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 15:18:16 +00:00

OpenCL Device: Do a check on available constant memory size and abort if it's less than 64kB

This commit is contained in:
jsteube 2017-01-29 10:11:13 +01:00
parent 2d2eadd2f6
commit 0309afc273
2 changed files with 16 additions and 0 deletions

View File

@ -41,6 +41,7 @@
- Files: Do several file and folder checks on startup rather than when they are actually used to avoid related error after eventual intense operations - Files: Do several file and folder checks on startup rather than when they are actually used to avoid related error after eventual intense operations
- Helper: Added functions to check existence, type, read- and write-permissions and rewrite sources to use them instead of stat() - Helper: Added functions to check existence, type, read- and write-permissions and rewrite sources to use them instead of stat()
- OpenCL Runtime: Updated AMDGPU-Pro driver version check, do warn if version 16.60 is detected which is known to be broken - OpenCL Runtime: Updated AMDGPU-Pro driver version check, do warn if version 16.60 is detected which is known to be broken
- OpenCL Device: Do a check on available constant memory size and abort if it's less than 64kB
- Sessions: Move out handling of multiple instance from restore file into separate pidfile - Sessions: Move out handling of multiple instance from restore file into separate pidfile
* changes v3.20 -> v3.30: * changes v3.20 -> v3.30:

View File

@ -2741,6 +2741,21 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
hcfree (device_extensions); hcfree (device_extensions);
// device_max_constant_buffer_size
cl_ulong device_max_constant_buffer_size;
CL_rc = hc_clGetDeviceInfo (hashcat_ctx, device_param->device, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, sizeof (device_max_constant_buffer_size), &device_max_constant_buffer_size, NULL);
if (CL_rc == -1) return -1;
if (device_max_constant_buffer_size < 65536)
{
event_log_error (hashcat_ctx, "* Device #%u: Device constant buffer size is too small", device_id + 1);
device_param->skipped = true;
}
// device_local_mem_size // device_local_mem_size
cl_ulong device_local_mem_size; cl_ulong device_local_mem_size;