openwall / john

John the Ripper jumbo - advanced offline password cracker, which supports hundreds of hash and cipher types, and runs on many operating systems, CPUs, GPUs, and even some FPGAs
https://www.openwall.com/john/
Other
10.04k stars 2.08k forks source link

OpenCL support issue in Ubuntu 18.04.1 #3492

Closed madtomic closed 5 years ago

madtomic commented 5 years ago

I am testing now with a single card, AMD RX 470 card on Ubuntu 18.04.1

I found out amdgpu-pro driver can install legacy driver to support OpenCL, using ./amdgpu-pro-install -y --opencl=legacy

Also, Alex mentioned this when he pull his shell history so I google a bit on how to do this.

Here is my setup and I don't know why the OpenCL support is not detected while configuring.

During ./configure --enable-mpi - I see this line.

OpenCL support ............................. no

While make... I see a warning about some code.

tezos@tezos-desktop:~/Downloads/JohnTheRipper/src$ make -s clean && make -sj4 ar: creating aes.a ar: creating ed25519-donna.a ar: creating secp256k1.a single.c: In function ‘single_init’: single.c:170:25: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses] (mpi_p_local > 1 | options.fork)



Make process completed.

I had tried 18.20 - 18.40 drivers, all same issue with OpenCL
>Driver and System Info

tezos@tezos-desktop:~/JohnTheRipper/run$ dpkg -l amdgpu-pro
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  amdgpu-pro     18.20-673703 amd64        Meta package to install amdgpu Pr

tezos@tezos-desktop:~/JohnTheRipper/run$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

>John Build Info

tezos@tezos-desktop:~/JohnTheRipper/run$ ./john --list=build-info
Version: 1.8.0.13-jumbo-1-bleeding-323f4babd 2018-12-07 11:06:56 +0000
Build: linux-gnu 64-bit x86_64 AVX2 AC MPI + OMP
SIMD: AVX2, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1
CPU tests: AVX2
$JOHN is ./
Format interface version: 14
Max. number of reported tunable costs: 4
Rec file version: REC4
Charset file version: CHR3
CHARSET_MIN: 1 (0x01)
CHARSET_MAX: 255 (0xff)
CHARSET_LENGTH: 24
SALT_HASH_SIZE: 1048576
Max. Markov mode level: 400
Max. Markov mode password length: 30
gcc version: 7.3.0
GNU libc version: 2.27 (loaded: 2.27)
Crypto library: OpenSSL
OpenSSL library version: 01010007f
OpenSSL 1.1.0g  2 Nov 2017
GMP library version: 6.1.2
File locking: fcntl()
fseek(): fseek
ftell(): ftell
fopen(): fopen
memmem(): System's

- `$ ./john --list=opencl-devices` (if applicable).
>Does not work as it wasn't detected in the build.
magnumripper commented 5 years ago

single.c:170:25: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses] (mpi_p_local > 1 | options.fork)

That was a bug. Fixed now.

madtomic commented 5 years ago

I forgot to include this...

tezos@tezos-desktop:~/Downloads/JohnTheRipper/run$ sudo lshw -c video *-display
description: VGA compatible controller product: Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] vendor: Advanced Micro Devices, Inc. [AMD/ATI] physical id: 0 bus info: pci@0000:2e:00.0 version: cf width: 64 bits clock: 33MHz capabilities: pm pciexpress msi vga_controller bus_master cap_list rom configuration: driver=amdgpu latency=0 resources: irq:76 memory:e0000000-efffffff memory:f0000000-f01fffff ioport:f000(size=256) memory:fe900000-fe93ffff memory:c0000-dffff

tezos@tezos-desktop:~/Downloads/JohnTheRipper/run$ lspci -nnk | grep -i vga -A3 2e:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df] (rev cf) Subsystem: PC Partner Limited / Sapphire Technology Radeon RX 470/480 [174b:e347] Kernel driver in use: amdgpu Kernel modules: amdgpu

magnumripper commented 5 years ago

All current AMD cards suck, so we're not testing any new drivers. I have no idea what's wrong with your OpenCL setup but you need to fix that.

madtomic commented 5 years ago

Latest driver clearly stated it supports my AMD card. https://www.amd.com/en/support/kb/release-notes/rn-prorad-lin-18-40

Installation instruction give me some idea how to set up OpenCL support. I could try to use

--compute (DEPRECATED) Equal to --opencl=legacy --headless

https://www.amd.com/en/support/kb/release-notes/AMDGPU-INSTALLATION

I am stuck once again... err

magnumripper commented 5 years ago

Does clinfo show your card?

claudioandre-br commented 5 years ago

You should attach config.log. We can't see what is happening without the full log.

Anyway:

That said, my opinion is that if you can use Windows (as suggested on john-users), you should.

You've been fighting windmills for weeks. That is not a good user experience.

claudioandre-br commented 5 years ago

I had tried 18.20 - 18.40 drivers, all same issue with OpenCL

BTW: 18.20 should fail. But, 18.40 should work.

claudioandre-br commented 5 years ago

Bug closed because of: