openwall / openwall/john

argon2-opencl: rusticl misdetected as ancient AMD Catalyst, doesn't recognize asm

Open
#5,941 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

portability
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Follow-up to
john -list=opencl-devices -dev=2

Platform #1 name: rusticl, version: OpenCL 3.0 
    Device #0 (2) name:     AMD Radeon RX 5700 XT (radeonsi, navi10, LLVM 21.1.6, DRM 3.64, 6.18.4-artix1-1)
    Device vendor:          AMD
    Device type:            GPU (LE)
    Device version:         OpenCL 3.0 
    OpenCL version support: OpenCL C 1.2 
    Driver version:         25.3.3-arch1.1 
    Native vector widths:   char 1, short 1, int 1, long 1
    Preferred vector width: char 1, short 1, int 1, long 1
    Global Memory:          8 GiB
    Local Memory:           64 KiB (Global)
    Constant Buffer size:   64 MiB
    Max memory alloc. size: 2047 MiB
    Max clock (MHz):        2100
    Profiling timer res.:   10 ns
    Max Work Group Size:    1024
    Parallel compute cores: 40
    Stream processors:      2560  (40 x 64)
    Speed index:            5376000

john --test --format=opencl

Device 2@arous: AMD Radeon RX 5700 XT (radeonsi, navi10, LLVM 21.1.6, DRM 3.64, 6.18.4-artix1-1)
Benchmarking: AndroidBackup-opencl [PBKDF2-SHA1 AES OpenCL]... LWS=32 GWS=655360 (20480 blocks) DONE
Speed for cost 1 (iteration count) of 10000
Raw:    184089 c/s real, 26214K c/s virtual

Benchmarking: agilekeychain-opencl, 1Password Agile Keychain [PBKDF2-SHA1 AES OpenCL]... LWS=512 GWS=20480 (40 blocks) DONE
Speed for cost 1 (iteration count) of 1000
Raw:    3102K c/s real, 41369K c/s virtual

Benchmarking: ansible-opencl, Ansible Vault [PBKDF2-SHA256 HMAC-SHA256 OpenCL]... LWS=32 GWS=81920 (2560 blocks) DONE
Speed for cost 1 (iteration count) of 10000
Raw:    159843 c/s real, 8192K c/s virtual

Benchmarking: argon2-opencl, Argon2 [BlaMka OpenCL]... Options used: -I opencl -cl-mad-enable -cl-std=CL1.2 -D__GPU__ -DDEVICE_INFO=522 -D__SIZEOF_HOST_SIZE_T__=8 -DDEV_VER_MAJOR=25 -DDEV_VER_MINOR=3 -D_OPENCL_COMPILER -DWARP_SIZE=64 -DSHARED_MEM_SIZE=65536 -DUSE_WARP_SHUFFLE=0 /usr/share/john/opencl/argon2_kernel.cl
Build time: 20.410 ms
Build log: input.cl:101:2: error: use of undeclared identifier 'asm'
  101 |         asm("" ::: "memory");
      |         ^~~
Error executing LLVM compilation action.

Error building kernel /usr/share/john/opencl/argon2_kernel.cl. DEVICE_INFO=522
0: OpenCL CL_BUILD_PROGRAM_FAILURE (-11) error in opencl_common.c:1338 - clBuildProgram

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce with john -list=opencl-devices -dev=2 and john --test --format=opencl, then inspect the device-detection path and opencl_common.c around clBuildProgram. Compare the reported rusticl/AMD device details with opencl/argon2_kernel.cl, especially the failing asm at line 101; done means argon2-opencl builds and runs for this device without the shown error.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.