Skip to content

Commit

Permalink
Requirements: Update runtime check for minimum NVIDIA driver version …
Browse files Browse the repository at this point in the history
…from 367.x to 418.56 or later
  • Loading branch information
jsteube committed Apr 18, 2019
1 parent 38c1029 commit e7ae8e6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
- Keep Guessing: No longer automatically activate --keep-guessing for modes 9720, 9820, 14900 and 18100
- Kernel Cache: Reactivate OpenCL runtime specific kernel caches
- Mode 16800/16801 hash format: Changed separator character from '*' to ':'
- Requirements: Update runtime check for minimum NVIDIA driver version from 367.x to 418.56 or later

* changes v5.0.0 -> v5.1.0

Expand Down
2 changes: 1 addition & 1 deletion docs/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AMD GPUs on Windows require "AMD Radeon Software Crimson Edition" (15.12 or late
Intel CPUs require "OpenCL Runtime for Intel Core and Intel Xeon Processors" (16.1.1 or later)
Intel GPUs on Linux require "OpenCL 2.0 GPU Driver Package for Linux" (2.0 or later)
Intel GPUs on Windows require "OpenCL Driver for Intel Iris and Intel HD Graphics"
NVIDIA GPUs require "NVIDIA Driver" (367.x or later)
NVIDIA GPUs require "NVIDIA Driver" (418.56 or later)

##
## Features
Expand Down
44 changes: 37 additions & 7 deletions src/opencl.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ int ocl_init (hashcat_ctx_t *hashcat_ctx)
#endif

event_log_warning (hashcat_ctx, "* NVIDIA GPUs require this runtime and/or driver:");
event_log_warning (hashcat_ctx, " \"NVIDIA Driver\" (367.x or later)");
event_log_warning (hashcat_ctx, " \"NVIDIA Driver\" (418.56 or later)");
event_log_warning (hashcat_ctx, NULL);

return -1;
Expand Down Expand Up @@ -3060,7 +3060,7 @@ int opencl_ctx_init (hashcat_ctx_t *hashcat_ctx)
#endif

event_log_warning (hashcat_ctx, "* NVIDIA GPUs require this runtime and/or driver:");
event_log_warning (hashcat_ctx, " \"NVIDIA Driver\" (367.x or later)");
event_log_warning (hashcat_ctx, " \"NVIDIA Driver\" (418.56 or later)");
event_log_warning (hashcat_ctx, NULL);

FREE_OPENCL_CTX_ON_ERROR;
Expand Down Expand Up @@ -3861,7 +3861,7 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)

if (intel_warn == true)
{
event_log_error (hashcat_ctx, "* Device #%u: Outdated or broken Intel OpenCL runtime detected!", device_id + 1);
event_log_error (hashcat_ctx, "* Device #%u: Outdated or broken Intel OpenCL runtime '%s' detected!", device_id + 1, device_param->driver_version);

event_log_warning (hashcat_ctx, "You are STRONGLY encouraged to use the officially supported NVIDIA driver.");
event_log_warning (hashcat_ctx, "See hashcat.net for officially supported NVIDIA drivers.");
Expand Down Expand Up @@ -3899,7 +3899,7 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)

if (amd_warn == true)
{
event_log_error (hashcat_ctx, "* Device #%u: Outdated or broken AMD driver detected!", device_id + 1);
event_log_error (hashcat_ctx, "* Device #%u: Outdated or broken AMD driver '%s' detected!", device_id + 1, device_param->driver_version);

event_log_warning (hashcat_ctx, "You are STRONGLY encouraged to use the officially supported AMD driver.");
event_log_warning (hashcat_ctx, "See hashcat.net for officially supported AMD drivers.");
Expand All @@ -3915,12 +3915,42 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
{
int nv_warn = true;

// nvidia driver 367.x and higher
if (strtoul (device_param->driver_version, NULL, 10) >= 367) nv_warn = false;
int version_maj = 0;
int version_min = 0;

const int r = sscanf (device_param->driver_version, "%d.%d", &version_maj, &version_min);

if (r == 2)
{
if (version_maj >= 367)
{
if (version_maj == 418)
{
// older 418.x versions are known to be broken.
// for instance, NVIDIA-Linux-x86_64-418.43.run
// run ./hashcat -b -m 2501 results in self-test fail

if (version_min >= 56)
{
nv_warn = false;
}
}
else
{
nv_warn = false;
}
}
}
else
{
// unknown version scheme, probably new driver version

nv_warn = false;
}

if (nv_warn == true)
{
event_log_error (hashcat_ctx, "* Device #%u: Outdated or broken NVIDIA driver detected!", device_id + 1);
event_log_error (hashcat_ctx, "* Device #%u: Outdated or broken NVIDIA driver '%s' detected!", device_id + 1, device_param->driver_version);

event_log_warning (hashcat_ctx, "You are STRONGLY encouraged to use the officially supported NVIDIA driver.");
event_log_warning (hashcat_ctx, "See hashcat's homepage for officially supported NVIDIA drivers.");
Expand Down

0 comments on commit e7ae8e6

Please sign in to comment.