[GH-ISSUE #909] Add driver version macro logic to common-opencl.c #511

Closed
opened 2026-10-14 03:11:26 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @magnumripper on GitHub (Dec 18, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/909

Query for CL_DRIVER_VERSION, process it a little (see below) and pass the information to run-time compiler as integer macros -DDEV_VER_MAJOR=number, -DDEV_VER_MINOR=number.

Vendor Original string DEV_VER_MAJOR DEV_VER_MINOR
AMD 1124.2 (sse2,avx,fma4) 1124 2
AMD 1214.3 (VM) 1214 3
nvidia 319.23 319 23
Intel 1.2.0.76921 1 2
nvidia (OSX) 10.0.43 310.41.05f01 10 0
Intel (OSX) 1.2(Sep 25 2014 22:26:04) 1  2
Intel (OSX) 1.1 1 1

Actually in the nvidia OSX case, it would be better to catch the "310.41" string but we want to keep this simple. Easiest is to scan for a number and when found, parse it until something other than "." or a digit.

The Intel 1.2.0.76921 is also tricky. Should we only have MAJOR/MINOR and report it just as 1, 2? As I'm mostly interested in AMD and nvidia, I think DEV_VER_MAJOR and DEV_VER_MINOR will suffice.

Originally created by @magnumripper on GitHub (Dec 18, 2014). Original GitHub issue: https://github.com/openwall/john/issues/909 Query for CL_DRIVER_VERSION, process it a little (see below) and pass the information to run-time compiler as integer macros -DDEV_VER_MAJOR=number, -DDEV_VER_MINOR=number. | Vendor | Original string | DEV_VER_MAJOR | DEV_VER_MINOR | | --- | --- | --- | --- | | AMD | 1124.2 (sse2,avx,fma4) | 1124 | 2 | | AMD | 1214.3 (VM) | 1214 | 3 | | nvidia | 319.23 | 319 | 23 | | Intel | 1.2.0.76921 | 1 | 2 | | nvidia (OSX) | 10.0.43 310.41.05f01 | 10 | 0 | | Intel (OSX) | 1.2(Sep 25 2014 22:26:04) | 1  | 2 | | Intel (OSX) | 1.1 | 1 | 1 | Actually in the nvidia OSX case, it would be better to catch the "310.41" string but we want to keep this simple. Easiest is to scan for a number and when found, parse it until something other than "." or a digit. The Intel 1.2.0.76921 is also tricky. Should we only have MAJOR/MINOR and report it just as 1, 2? As I'm mostly interested in AMD and nvidia, I think DEV_VER_MAJOR and DEV_VER_MINOR will suffice.
bsakaguchi 2026-10-14 03:11:26 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#511
No description provided.