From 8fe0a36b304d3939ff94c716251a88267743e045 Mon Sep 17 00:00:00 2001 From: jsteube Date: Thu, 6 Jul 2017 21:54:28 +0200 Subject: [PATCH] OpenCL Runtime: Updated AMD ROCm driver version check, warn if version < 1.1 --- docs/changes.txt | 1 + src/opencl.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 28cab2257..81ec87b77 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -25,6 +25,7 @@ ## Improvements ## +- OpenCL Runtime: Updated AMD ROCm driver version check, warn if version < 1.1 - WPA cracking: Improved nonce-error-corrections mode to use a both positive and negative corrections * changes v3.5.0 -> v3.6.0: diff --git a/src/opencl.c b/src/opencl.c index 819da1f7e..3107310c4 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -3295,8 +3295,15 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) { bool amd_warn = true; + const char *t1 = strstr (device_param->driver_version, "(HSA,LC)"); + const char *t2 = strstr (device_param->driver_version, "(PAL,LC)"); + const char *t3 = strstr (device_param->driver_version, "(PAL,HSAIL)"); + const char *t4 = strstr (device_param->driver_version, "(HSA, LC)"); + const char *t5 = strstr (device_param->driver_version, "(PAL, LC)"); + const char *t6 = strstr (device_param->driver_version, "(PAL, HSAIL)"); + #if defined (__linux__) - if (strstr (device_param->driver_version, "(HSA,LC)") == NULL) + if ((t1 == NULL) && (t2 == NULL) && (t3 == NULL) && (t4 == NULL) && (t5 == NULL) && (t6 == NULL)) { // AMDGPU-PRO Driver 16.40 and higher if (atoi (device_param->driver_version) >= 2117) amd_warn = false;