Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hashcat Kernel fails to compile #598

Merged
merged 1 commit into from
Aug 13, 2023
Merged

Hashcat Kernel fails to compile #598

merged 1 commit into from
Aug 13, 2023

Conversation

zwang20
Copy link
Contributor

@zwang20 zwang20 commented Aug 10, 2023

Hashcat information mode works

$ LD_LIBRARY_PATH=./build hashcat -I
hashcat (v6.2.6) starting in benchmark mode

...

OpenCL Info:
============

OpenCL Platform ID #1
  Vendor..: clvk
  Name....: clvk
  Version.: OpenCL 3.0 clvk

  Backend Device ID #2
    Type...........: GPU
    Vendor.ID......: 32
    Vendor.........: NVIDIA Corporation
    Name...........: NVIDIA GeForce RTX 3070 Ti
    Version........: OpenCL 3.0 CLVK on Vulkan v1.3.242 driver 2245361984
    Processor(s)...: 1
    Clock..........: 0
    Memory.Total...: 8192 MB (limited to 1024 MB allocatable in one block)
    Memory.Free....: 8064 MB
    Local.Memory...: 48 KB
    OpenCL.Version.: OpenCL C 1.2 CLVK on Vulkan v1.3.242 driver 2245361984
    Driver.Version.: 3.0 CLVK on Vulkan v1.3.242 driver 2245361984

However, when attempting to run a benchmark, the kernel fails to build.

$ LD_LIBRARY_PATH=./build hashcat -d 2 -b

hashcat (v6.2.6) starting in benchmark mode

...

OpenCL API (OpenCL 3.0 clvk) - Platform #1 [clvk]
=================================================
* Device #2: NVIDIA GeForce RTX 3070 Ti, 8064/8192 MB (1024 MB allocatable), 1MCU

Benchmark relevant options:
===========================
* --backend-devices=2
* --optimized-kernel-enable

-------------------
* Hash-Mode 0 (MD5)
-------------------

sh: -c: line 1: syntax error near unexpected token `('
sh: -c: line 1: `/home/michael/Documents/clvk/build/clspv clvk-oyJEGw/source.cl  -D KERNEL_STATIC -D INCLUDE_PATH=/usr/share/hashcat/OpenCL -D XM2S(x)=#x -D M2S(x)=XM2S(x) -D LOCAL_MEM_TYPE=1 -D VENDOR_ID=2147483648 -D CUDA_ARCH=0 -D HAS_ADD=0 -D HAS_ADDC=0 -D HAS_SUB=0 -D HAS_SUBC=0 -D HAS_VADD=0 -D HAS_VADDC=0 -D HAS_VADD_CO=0 -D HAS_VADDC_CO=0 -D HAS_VSUB=0 -D HAS_VSUBB=0 -D HAS_VSUB_CO=0 -D HAS_VSUBB_CO=0 -D HAS_VPERM=0 -D HAS_VADD3=0 -D HAS_VBFE=0 -D HAS_BFE=0 -D HAS_LOP3=0 -D HAS_MOV64=0 -D HAS_PRMT=0 -D VECT_SIZE=8 -D DEVICE_TYPE=4 -D DGST_R0=0 -D DGST_R1=3 -D DGST_R2=2 -D DGST_R3=1 -D DGST_ELEM=4 -D KERN_TYPE=0 -D ATTACK_EXEC=11 -D ATTACK_KERN=3 -D ATTACK_MODE=3 -w  -cl-single-precision-constant  -cl-kernel-arg-info   -rounding-mode-rte=16,32,64  -rewrite-packed-structs  -std430-ubo-layout  -decorate-nonuniform    -arch=spir  --use-native-builtins=acos,acosh,acospi,asin,asinh,asinpi,atan,atan2,atan2pi,atanh,atanpi,ceil,copysign,fabs,fdim,floor,fma,fmax,fmin,frexp,half_rsqrt,half_sqrt,isequal,isfinite,isgreater,isgreaterequal,isinf,isless,islessequal,islessgreater,isnan,isnormal,isnotequal,isordered,isunordered,ldexp,mad,rint,round,rsqrt,signbit,sqrt,tanh,trunc,  -spv-version=1.6  -max-pushconstant-size=256  -max-ubo-size=65536  -global-offset  -long-vector  -module-constants-in-storage-buffer  -cl-arm-non-uniform-work-group-size   -enable-printf  -printf-buffer-size=1048576    --output-format=bc -Iclvk-oyJEGw -o clvk-oyJEGw/compiled.bc 2>&1'
clCompileProgram(): CL_BUILD_PROGRAM_FAILURE


* Device #2: Kernel /usr/share/hashcat/OpenCL/shared.cl build failed.

----------------------
* Hash-Mode 100 (SHA1)
----------------------

sh: -c: line 1: syntax error near unexpected token `('
sh: -c: line 1: `/home/michael/Documents/clvk/build/clspv clvk-3PHTVg/source.cl  -D KERNEL_STATIC -D INCLUDE_PATH=/usr/share/hashcat/OpenCL -D XM2S(x)=#x -D M2S(x)=XM2S(x) -D LOCAL_MEM_TYPE=1 -D VENDOR_ID=2147483648 -D CUDA_ARCH=0 -D HAS_ADD=0 -D HAS_ADDC=0 -D HAS_SUB=0 -D HAS_SUBC=0 -D HAS_VADD=0 -D HAS_VADDC=0 -D HAS_VADD_CO=0 -D HAS_VADDC_CO=0 -D HAS_VSUB=0 -D HAS_VSUBB=0 -D HAS_VSUB_CO=0 -D HAS_VSUBB_CO=0 -D HAS_VPERM=0 -D HAS_VADD3=0 -D HAS_VBFE=0 -D HAS_BFE=0 -D HAS_LOP3=0 -D HAS_MOV64=0 -D HAS_PRMT=0 -D VECT_SIZE=1 -D DEVICE_TYPE=4 -D DGST_R0=3 -D DGST_R1=4 -D DGST_R2=2 -D DGST_R3=1 -D DGST_ELEM=5 -D KERN_TYPE=100 -D ATTACK_EXEC=11 -D ATTACK_KERN=3 -D ATTACK_MODE=3 -w  -cl-single-precision-constant  -cl-kernel-arg-info   -rounding-mode-rte=16,32,64  -rewrite-packed-structs  -std430-ubo-layout  -decorate-nonuniform    -arch=spir  --use-native-builtins=acos,acosh,acospi,asin,asinh,asinpi,atan,atan2,atan2pi,atanh,atanpi,ceil,copysign,fabs,fdim,floor,fma,fmax,fmin,frexp,half_rsqrt,half_sqrt,isequal,isfinite,isgreater,isgreaterequal,isinf,isless,islessequal,islessgreater,isnan,isnormal,isnotequal,isordered,isunordered,ldexp,mad,rint,round,rsqrt,signbit,sqrt,tanh,trunc,  -spv-version=1.6  -max-pushconstant-size=256  -max-ubo-size=65536  -global-offset  -long-vector  -module-constants-in-storage-buffer  -cl-arm-non-uniform-work-group-size   -enable-printf  -printf-buffer-size=1048576    --output-format=bc -Iclvk-3PHTVg -o clvk-3PHTVg/compiled.bc 2>&1'
clCompileProgram(): CL_BUILD_PROGRAM_FAILURE


* Device #2: Kernel /usr/share/hashcat/OpenCL/shared.cl build failed.

...

@kpet
Copy link
Owner

kpet commented Aug 10, 2023

Thanks for the report and PR! This is a known issue and we need to quote build options to make this work which is a bit tricky. I'll create an issue with the details and merge this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants