[GH-ISSUE #908] See if we can get oldoffice-opencl working w/ ancient Catalyst drivers #509

Closed
opened 2026-10-14 03:10:48 +07:00 by bsakaguchi · 98 comments
Owner

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

Neither of Bull, Well and Super can run the oldoffice-opencl format. It works fine with all nvidias I've tried (new and old) as well as all three devices in my Macbook laptop.

Always "FAILED (cmp_all(1))"

Originally created by @magnumripper on GitHub (Dec 18, 2014). Original GitHub issue: https://github.com/openwall/john/issues/908 Neither of Bull, Well and Super can run the oldoffice-opencl format. It works fine with all nvidias I've tried (new and old) as well as all three devices in my Macbook laptop. Always "FAILED (cmp_all(1))"
bsakaguchi 2026-10-14 03:10:48 +07:00
Author
Owner

@ghost commented on GitHub (Dec 18, 2014):

My opinion is that neither of these (installed) drivers deserves attention. They are simply not good enough.

BTW: it works fine here.

<!-- gh-comment-id:67536487 --> @ghost commented on GitHub (Dec 18, 2014): My opinion is that neither of these (installed) drivers deserves attention. They are simply not good enough. BTW: it works fine here.
Author
Owner

@magnumripper commented on GitHub (Dec 18, 2014):

That's sort of my opinion too - it's not exactly a priority. It's probably not very hard though. Just isolate exactly where it fails, using LWS=GWS=1 and printf's, and then throw things at the code and see what sticks 😝

<!-- gh-comment-id:67539958 --> @magnumripper commented on GitHub (Dec 18, 2014): That's sort of my opinion too - it's not exactly a priority. It's probably not very hard though. Just isolate exactly where it fails, using LWS=GWS=1 and printf's, and then throw things at the code and see what sticks :stuck_out_tongue_closed_eyes:
Author
Owner

@magnumripper commented on GitHub (Dec 18, 2014):

BTW: it works fine here.

And what's that, 14.9? 14.6?

<!-- gh-comment-id:67540257 --> @magnumripper commented on GitHub (Dec 18, 2014): > BTW: it works fine here. And what's that, 14.9? 14.6?
Author
Owner

@ghost commented on GitHub (Dec 18, 2014):

And what's that, 14.9? 14.6?

1573.4 (14.9, I guess)

<!-- gh-comment-id:67541190 --> @ghost commented on GitHub (Dec 18, 2014): > And what's that, 14.9? 14.6? 1573.4 (14.9, I guess)
Author
Owner

@ghost commented on GitHub (Dec 18, 2014):

4 out of 46 tests have FAILED

  • Testing: office2013-opencl, MS Office 2013 (100,000 iterations) [SHA512 OpenCL 2x AES]... (6xOMP) FAILED (cmp_all(1))
  • Testing: pbkdf2-hmac-sha512-opencl, GRUB2 / OS X 10.8+, rounds=10000 [PBKDF2-SHA512 OpenCL]... FAILED (get_hash0)
  • Testing: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 4x]... FAILED (get_hash0)
  • Testing: wpapsk-opencl, WPA/WPA2 PSK [PBKDF2-SHA1 OpenCL 4x]... FAILED (get_hash0)

The first format is just too agressive [2x] for my board.
And DES is disabled (go to problems).

<!-- gh-comment-id:67544188 --> @ghost commented on GitHub (Dec 18, 2014): 4 out of 46 tests have FAILED - Testing: office2013-opencl, MS Office 2013 (100,000 iterations) [SHA512 OpenCL 2x AES]... (6xOMP) FAILED (cmp_all(1)) - Testing: pbkdf2-hmac-sha512-opencl, GRUB2 / OS X 10.8+, rounds=10000 [PBKDF2-SHA512 OpenCL]... FAILED (get_hash[0](0)) - Testing: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 4x]... FAILED (get_hash[0](0)) - Testing: wpapsk-opencl, WPA/WPA2 PSK [PBKDF2-SHA1 OpenCL 4x]... FAILED (get_hash[0](0)) --- The first format is just too agressive [2x] for my board. And DES is disabled (go to problems).
Author
Owner

@magnumripper commented on GitHub (Dec 18, 2014):

Yes, 1573.4 is 14.9.

So we have problems even with 14.9 - but non-GCN. What if you use --force-scalar?

<!-- gh-comment-id:67547289 --> @magnumripper commented on GitHub (Dec 18, 2014): Yes, 1573.4 is 14.9. So we have problems even with 14.9 - but non-GCN. What if you use `--force-scalar`?
Author
Owner

@ghost commented on GitHub (Dec 19, 2014):

What if you use --force-scalar?

It did. Anyway, it does now with 14.12.

$ ../run/john -te -form=office2013-opencl --force-scalar
Will run 6 OpenMP threads
Device 0: Juniper (AMD Radeon HD 6700 Series)
Local worksize (LWS) 64, global worksize (GWS) 2048
Benchmarking: office2013-opencl, MS Office 2013 (100,000 iterations) [SHA512 OpenCL AES]... (6xOMP) DONE
Raw:    361 c/s real, 2467 c/s virtual
<!-- gh-comment-id:67627363 --> @ghost commented on GitHub (Dec 19, 2014): > What if you use --force-scalar? It did. Anyway, it does now with 14.12. ``` $ ../run/john -te -form=office2013-opencl --force-scalar Will run 6 OpenMP threads Device 0: Juniper (AMD Radeon HD 6700 Series) Local worksize (LWS) 64, global worksize (GWS) 2048 Benchmarking: office2013-opencl, MS Office 2013 (100,000 iterations) [SHA512 OpenCL AES]... (6xOMP) DONE Raw: 361 c/s real, 2467 c/s virtual ```
Author
Owner

@ghost commented on GitHub (Dec 19, 2014):

The same result is seen.

4 out of 46 tests have FAILED

And DES

Error:E010:Irreducible ControlFlow Detected
<!-- gh-comment-id:67628625 --> @ghost commented on GitHub (Dec 19, 2014): The same result is seen. ``` 4 out of 46 tests have FAILED ``` And DES ``` Error:E010:Irreducible ControlFlow Detected ```
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

What, AMD actually fixed a bug? That must have been inadvertently. But it's still too heavy when running vectorized? For a Juniper it might be a good idea to set ForceScalar = Y in john.conf but it would be nice to make that decision in code based on some good parameter. nvidia can report number of GPR per work group but AMD can't. So how would I tell it is register starved?

<!-- gh-comment-id:67628720 --> @magnumripper commented on GitHub (Dec 19, 2014): What, AMD actually fixed a bug? That must have been inadvertently. But it's still too heavy when running vectorized? For a Juniper it might be a good idea to set ForceScalar = Y in john.conf but it would be nice to make that decision in code based on some good parameter. nvidia can report number of GPR per work group but AMD can't. So how would I tell it is register starved?
Author
Owner

@ghost commented on GitHub (Dec 19, 2014):

What, AMD actually fixed a bug?

14.9 was giving the same results. But they did something important in memory management (it seems to me).
Auto-tune has to be more carefully handled. For example (4M seems to much), please review your checks and limits (BTW: raw-md?, raw-sha* are working fine):

$ ../run/john -te:5 -form=oldoffice-opencl
Device 0: Juniper (AMD Radeon HD 6700 Series)
xP: 368.889us, xI: 192.112us, enc: 15.399ms, md5+rc4: 919.519ms, xR: 1.253ms
gws:   2097152     2238791 c/s     2238791 rounds/s 936.733ms per crypt_all()
OpenCL error (CL_INVALID_BUFFER_SIZE) in file (opencl_oldoffice_fmt_plug.c) at line (180) - (Error creating device-only buffer)
<!-- gh-comment-id:67629581 --> @ghost commented on GitHub (Dec 19, 2014): > What, AMD actually fixed a bug? 14.9 was giving the same results. But they did something important in memory management (it seems to me). Auto-tune has to be more carefully handled. For example (4M seems to much), please review your checks and limits (BTW: raw-md?, raw-sha\* are working fine): ``` $ ../run/john -te:5 -form=oldoffice-opencl Device 0: Juniper (AMD Radeon HD 6700 Series) xP: 368.889us, xI: 192.112us, enc: 15.399ms, md5+rc4: 919.519ms, xR: 1.253ms gws: 2097152 2238791 c/s 2238791 rounds/s 936.733ms per crypt_all() OpenCL error (CL_INVALID_BUFFER_SIZE) in file (opencl_oldoffice_fmt_plug.c) at line (180) - (Error creating device-only buffer) ```
Author
Owner

@ghost commented on GitHub (Dec 19, 2014):

make that decision in code based on some good parameter.

You can select safety and run scalar if you are not on CGN (for example, in AMD). This is easy to do in code.

#if !(amd_gcn(DEVICE_INFO))

So how would I tell it is register starved?

You can analyse this with CodeXL. But this is time consuming, you have to analyse all compilation results.

<!-- gh-comment-id:67630659 --> @ghost commented on GitHub (Dec 19, 2014): > make that decision in code based on some good parameter. You can select safety and run scalar if you are not on CGN (for example, in AMD). This is easy to do in code. ``` #if !(amd_gcn(DEVICE_INFO)) ``` > So how would I tell it is register starved? You can analyse this with CodeXL. But this is time consuming, you have to analyse all compilation results.
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

You can select safety and run scalar if you are not on CGN (for example, in AMD). This is easy to do in code.

I already do a similar test. The problem is that on register starved devices, I'd like to force scalar because vectorizing get slower because of that even though the device is SIMD

<!-- gh-comment-id:67635035 --> @magnumripper commented on GitHub (Dec 19, 2014): > You can select safety and run scalar if you are not on CGN (for example, in AMD). This is easy to do in code. I already do a similar test. The problem is that on register starved devices, I'd like to force scalar because vectorizing get slower because of that even though the device is SIMD
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

Hmm if I'm NOT on GCN? It's the non-GCN devices that benefit from vectorizing - provided they have GPRs for it.

<!-- gh-comment-id:67635099 --> @magnumripper commented on GitHub (Dec 19, 2014): Hmm if I'm NOT on GCN? It's the non-GCN devices that benefit from vectorizing - provided they have GPRs for it.
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

@claudioandre what is the driver version reported by --list=opencl-devices for 14.12?

<!-- gh-comment-id:67639949 --> @magnumripper commented on GitHub (Dec 19, 2014): @claudioandre what is the driver version reported by --list=opencl-devices for 14.12?
Author
Owner

@ghost commented on GitHub (Dec 19, 2014):

Ok, I selected a bad example when I suggest to filter using GCN.


Real hardware is needed. Anyway, vectorized you are using a log of ScratchRegs

image

<!-- gh-comment-id:67654177 --> @ghost commented on GitHub (Dec 19, 2014): Ok, I selected a bad example when I suggest to filter using GCN. --- Real hardware is needed. Anyway, vectorized you are using a log of ScratchRegs ![image](https://cloud.githubusercontent.com/assets/1702923/5506741/4d486fd6-8784-11e4-9210-ec26c52f199b.png)
Author
Owner

@ghost commented on GitHub (Dec 19, 2014):

Platform #0 name: AMD Accelerated Parallel Processing
Platform version: OpenCL 2.0 AMD-APP (1642.5)
    Device #0 (0) name: Juniper
    Board name:     AMD Radeon HD 6700 Series  
    Device vendor:      Advanced Micro Devices, Inc.
    Device type:        GPU (LE)
    Device version:     OpenCL 1.2 AMD-APP (1642.5)
    Driver version:     1642.5
    Native vector widths:   char 16, short 8, int 4, long 2
    Preferred vector width: char 16, short 8, int 4, long 2
    Global Memory:      512.5 MB
    Local Memory:       32.0 KB (Local)
    Max memory alloc. size: 128.1 MB
    Max clock (MHz):    850
    Profiling timer res.:   1 ns
    Max Work Group Size:    256
    Parallel compute cores: 10
    Stream processors:  800  (10 x 80)
    PCI device topology:    01:00.0
    ADL:            Overdrive5, device id 0
    Fan speed:      40%
    Temperature:        41°C
    Utilization:        1%
<!-- gh-comment-id:67654241 --> @ghost commented on GitHub (Dec 19, 2014): ``` Platform #0 name: AMD Accelerated Parallel Processing Platform version: OpenCL 2.0 AMD-APP (1642.5) Device #0 (0) name: Juniper Board name: AMD Radeon HD 6700 Series Device vendor: Advanced Micro Devices, Inc. Device type: GPU (LE) Device version: OpenCL 1.2 AMD-APP (1642.5) Driver version: 1642.5 Native vector widths: char 16, short 8, int 4, long 2 Preferred vector width: char 16, short 8, int 4, long 2 Global Memory: 512.5 MB Local Memory: 32.0 KB (Local) Max memory alloc. size: 128.1 MB Max clock (MHz): 850 Profiling timer res.: 1 ns Max Work Group Size: 256 Parallel compute cores: 10 Stream processors: 800 (10 x 80) PCI device topology: 01:00.0 ADL: Overdrive5, device id 0 Fan speed: 40% Temperature: 41°C Utilization: 1% ```
Author
Owner

@ghost commented on GitHub (Dec 19, 2014):

In 'scalar mode' you avoid spills. And you "can double" occupancy.

image

<!-- gh-comment-id:67655789 --> @ghost commented on GitHub (Dec 19, 2014): In 'scalar mode' you avoid spills. And you "can double" occupancy. ![image](https://cloud.githubusercontent.com/assets/1702923/5506977/3b004252-8786-11e4-83ee-2344d9da1c4b.png)
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

Is that graph saying all those devices should run scalar? Some of them we might not even have macros for.

I suppose this might also apply to pbkdf2 kernels like WPA-PSK?

<!-- gh-comment-id:67675214 --> @magnumripper commented on GitHub (Dec 19, 2014): Is that graph saying all those devices should run scalar? Some of them we might not even have macros for. I suppose this might also apply to pbkdf2 kernels like WPA-PSK?
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

BTW my formats pick vector/scalar in host code. I guess I could use the AMD extension to get device name (eg. "Juniper") and use a blacklist that forces scalar for these chips.

<!-- gh-comment-id:67675552 --> @magnumripper commented on GitHub (Dec 19, 2014): BTW my formats pick vector/scalar in host code. I guess I could use the AMD extension to get device name (eg. "Juniper") and use a blacklist that forces scalar for these chips.
Author
Owner

@ghost commented on GitHub (Dec 19, 2014):

Is that graph saying all those devices should run scalar?

Not exactly (good registers numbers don't mean better performance). But, using 700+ ScratchRegs probably is not acceptable.

<!-- gh-comment-id:67677092 --> @ghost commented on GitHub (Dec 19, 2014): > Is that graph saying all those devices should run scalar? Not exactly (good registers numbers don't mean better performance). But, using 700+ ScratchRegs probably is not acceptable.
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

Auto-tune has to be more carefully handled. For example (4M seems to much), please review your checks and limits (BTW: raw-md?, raw-sha* are working fine)

This is an AMD bug, it was worked around in some formats and I now did it for some more in ec08011. The problem is when you create a pinned buffer of 100 MB, you will need 200 MB. This is only seen on AMD.

I did not change your formats but I think they should also have the same fix. They are probably safe now because allocation size is not the limiter, but kernel duration.

<!-- gh-comment-id:67677974 --> @magnumripper commented on GitHub (Dec 19, 2014): > Auto-tune has to be more carefully handled. For example (4M seems to much), please review your checks and limits (BTW: raw-md?, raw-sha\* are working fine) This is an AMD bug, it was worked around in some formats and I now did it for some more in ec08011. The problem is when you create a pinned buffer of 100 MB, you will need 200 MB. This is only seen on AMD. I did not change your formats but I think they should also have the same fix. They are probably safe now because allocation size is not the limiter, but kernel duration.
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

I created a wiki page for the version number mess

<!-- gh-comment-id:67679703 --> @magnumripper commented on GitHub (Dec 19, 2014): I created a wiki page for [the version number mess](https://github.com/magnumripper/JohnTheRipper/wiki/AMD-GPU-driver-version-mess)
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

Is that graph saying all those devices should run scalar?

Not exactly (good registers numbers don't mean better performance). But, using 700+ ScratchRegs probably is not acceptable.

All of them has that, except Cayman. It has 300+. What exact tool are you running? Is this on Linux?

<!-- gh-comment-id:67682012 --> @magnumripper commented on GitHub (Dec 19, 2014): > > Is that graph saying all those devices should run scalar? > > Not exactly (good registers numbers don't mean better performance). But, using 700+ ScratchRegs probably is not acceptable. All of them has that, except Cayman. It has 300+. What exact tool are you running? Is this on Linux?
Author
Owner

@ghost commented on GitHub (Dec 19, 2014):

All of them has that, except Cayman.

  • You mean All "Graphics IP v4".
  • All IP v5 are better, including Cayman (I disable some GPUs, not sure if I disabled any in these list).

What exact tool are you running? Is this on Linux?

CodeXL: (also) for Linux. I got these on Ubuntu LTS 14.04, Catalyst 14.12.

<!-- gh-comment-id:67699959 --> @ghost commented on GitHub (Dec 19, 2014): > All of them has that, except Cayman. - You mean All "Graphics IP v4". - All IP v5 are better, including Cayman (I disable some GPUs, not sure if I disabled any in these list). --- > What exact tool are you running? Is this on Linux? CodeXL: (also) for Linux. I got these on Ubuntu LTS 14.04, Catalyst 14.12.
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

That looks great, I should try to install it somewhere.

<!-- gh-comment-id:67714201 --> @magnumripper commented on GitHub (Dec 19, 2014): That looks great, I should try to install it somewhere.
Author
Owner

@magnumripper commented on GitHub (Dec 19, 2014):

You mean All "Graphics IP v4".

Could that be translated to something we have, like VLIW4?

<!-- gh-comment-id:67714255 --> @magnumripper commented on GitHub (Dec 19, 2014): > You mean All "Graphics IP v4". Could that be translated to something we have, like VLIW4?
Author
Owner

@ghost commented on GitHub (Dec 20, 2014):

Cayman, Devastator and Scrapper are VLIW4 (somehow better than [Juniper] VLIW5).

<!-- gh-comment-id:67719326 --> @ghost commented on GitHub (Dec 20, 2014): Cayman, Devastator and Scrapper are VLIW4 (somehow better than [Juniper] VLIW5).
Author
Owner

@ghost commented on GitHub (Dec 20, 2014):

  • IP v4 are 'VLIW5'
  • IP v5 are 'VLIW4'

To be confirmed...

<!-- gh-comment-id:67719516 --> @ghost commented on GitHub (Dec 20, 2014): - IP v4 are 'VLIW5' - IP v5 are 'VLIW4' To be confirmed...
Author
Owner

@magnumripper commented on GitHub (Dec 20, 2014):

that is so... unintuitive.

<!-- gh-comment-id:67719728 --> @magnumripper commented on GitHub (Dec 20, 2014): that is so... unintuitive.
Author
Owner

@magnumripper commented on GitHub (Dec 20, 2014):

So maybe I should never use vectors for VLIW5.

<!-- gh-comment-id:67719800 --> @magnumripper commented on GitHub (Dec 20, 2014): So maybe I should never use vectors for VLIW5.
Author
Owner

@ghost commented on GitHub (Dec 20, 2014):

  • There are v6, v7, ....

It is a bad thing that the '4' and '5' in VLIW* mean something.

So maybe I should never use vectors for VLIW5

A safe choice.

<!-- gh-comment-id:67719903 --> @ghost commented on GitHub (Dec 20, 2014): - There are v6, v7, .... It is a bad thing that the '4' and '5' in VLIW\* mean something. > So maybe I should never use vectors for VLIW5 A safe choice.
Author
Owner

@magnumripper commented on GitHub (Dec 20, 2014):

Can I see this in host code without adding anything? I know I can use amd_vliw5(DEVICE_INFO) in a kernel but what can I do in host code?

<!-- gh-comment-id:67720127 --> @magnumripper commented on GitHub (Dec 20, 2014): Can I see this in host code without adding anything? I know I can use amd_vliw5(DEVICE_INFO) in a kernel but what can I do in host code?
Author
Owner

@ghost commented on GitHub (Dec 20, 2014):

For example

if (amd_gcn(device_info[gpu_id])) {
    ...
} else if (amd_vliw5(device_info[gpu_id]))
...
else if (gpu_intel(device_info[gpu_id]))

<!-- gh-comment-id:67720589 --> @ghost commented on GitHub (Dec 20, 2014): For example ``` if (amd_gcn(device_info[gpu_id])) { ... } else if (amd_vliw5(device_info[gpu_id])) ... else if (gpu_intel(device_info[gpu_id])) ```
Author
Owner

@magnumripper commented on GitHub (Dec 20, 2014):

That was easy :-)

<!-- gh-comment-id:67734658 --> @magnumripper commented on GitHub (Dec 20, 2014): That was easy :-)
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Hmm but older flagships like 5970/5990 is VLIW5 too. Are all VLIW5 register starved?

<!-- gh-comment-id:67756128 --> @magnumripper commented on GitHub (Dec 21, 2014): Hmm but older flagships like 5970/5990 is VLIW5 too. Are all VLIW5 register starved?
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

I will try to see/analyse Hemlock in CodeXL. Anyway, do you think AMD build this hardware in a different way? Better than only 2 GPUs together?

I have doubts.


Default to safety and it can be improved as soon as we have reasons to do that.

If necessary, we can easily create:

if amd_ipv4(device_info[gpu_id])
else if (amd_ipv5(device_info[gpu_id]))
else if (amd_ipv6(device_info[gpu_id]))
<!-- gh-comment-id:67756588 --> @ghost commented on GitHub (Dec 21, 2014): I will try to see/analyse Hemlock in CodeXL. Anyway, do you think AMD build this hardware in a different way? Better than only 2 GPUs together? I have doubts. --- Default to safety and it can be improved as soon as we have reasons to do that. If necessary, we can easily create: ``` if amd_ipv4(device_info[gpu_id]) else if (amd_ipv5(device_info[gpu_id])) else if (amd_ipv6(device_info[gpu_id])) ```
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

It's just that I recall Dhiru had some VLIW device that benefited greatly from running even a heavy format like Office2007 vectorized. I'll try to find that mail, it's from years ago.

What is IP v6? Is that GCN 1.0?

<!-- gh-comment-id:67756790 --> @magnumripper commented on GitHub (Dec 21, 2014): It's just that I recall Dhiru had some VLIW device that benefited greatly from running even a heavy format like Office2007 vectorized. I'll try to find that mail, it's from years ago. What is IP v6? Is that GCN 1.0?
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

Test now. @kholia, could you please do that?

<!-- gh-comment-id:67756818 --> @ghost commented on GitHub (Dec 21, 2014): Test now. @kholia, could you please do that?
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

It's just that I recall Dhiru had some VLIW device that benefited greatly from running even a heavy format like Office2007 vectorized

Found that mail. He ran a Cayman. It did complain about register spilling but performance went from 16K to 24K c/s.

<!-- gh-comment-id:67756849 --> @magnumripper commented on GitHub (Dec 21, 2014): > It's just that I recall Dhiru had some VLIW device that benefited greatly from running even a heavy format like Office2007 vectorized Found that mail. He ran a Cayman. It did complain about register spilling but performance went from 16K to 24K c/s.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Yeah @kholia do you still have a Cayman? Can you try a "--test -form:opencl" with and without "--force-scalar" and see how they differ?

<!-- gh-comment-id:67756874 --> @magnumripper commented on GitHub (Dec 21, 2014): Yeah @kholia do you still have a Cayman? Can you try a "--test -form:opencl" with and without "--force-scalar" and see how they differ?
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

BTW, i will submit:

diff --git a/src/common-opencl.c b/src/common-opencl.c
index 23271da..17377fd 100644
--- a/src/common-opencl.c
+++ b/src/common-opencl.c
@@ -2109,28 +2109,34 @@ cl_uint get_processor_family(int sequential_id)

    if gpu_amd(device_info[sequential_id]) {

-       if ((strstr(dname, "Cedar") ||
+       if ((strstr(dname, "Cedar") ||       //AMD Radeon VLIW5
            strstr(dname, "Redwood") ||
            strstr(dname, "Juniper") ||
            strstr(dname, "Cypress") ||
            strstr(dname, "Hemlock") ||
-           strstr(dname, "Caicos") ||
+           strstr(dname, "Caicos") ||   //AMD Radeon VLIW5 Gen 2
            strstr(dname, "Turks") ||
            strstr(dname, "Barts") ||
-           strstr(dname, "Cayman") ||
-           strstr(dname, "Antilles") ||
            strstr(dname, "Wrestler") ||
+           strstr(dname, "Ontario") ||
            strstr(dname, "Zacate") ||
            strstr(dname, "WinterPark") ||
-           strstr(dname, "BeaverCreek"))) {
+           strstr(dname, "BeaverCreek") ||
+           strstr(dname, "Cayman") ||  //AMD Radeon VLIW4
+           strstr(dname, "Antilles") ||
+           strstr(dname, "Devastator") ||
+           strstr(dname, "R7")         //AMD Radeon VLIW4
+           )) {

            if (strstr(dname, "Cayman") ||
-               strstr(dname, "Antilles"))
+               strstr(dname, "Antilles") ||
+               strstr(dname, "Devastator"))
                return DEV_AMD_VLIW4;
            else
                return DEV_AMD_VLIW5;

        } else
+           //Cape Verde, Pitcairn, Tahiti, New Zealand, Malta, Bonaire
            return DEV_AMD_GCN;
    }
    return DEV_UNKNOWN;
<!-- gh-comment-id:67756914 --> @ghost commented on GitHub (Dec 21, 2014): BTW, i will submit: ``` diff --git a/src/common-opencl.c b/src/common-opencl.c index 23271da..17377fd 100644 --- a/src/common-opencl.c +++ b/src/common-opencl.c @@ -2109,28 +2109,34 @@ cl_uint get_processor_family(int sequential_id) if gpu_amd(device_info[sequential_id]) { - if ((strstr(dname, "Cedar") || + if ((strstr(dname, "Cedar") || //AMD Radeon VLIW5 strstr(dname, "Redwood") || strstr(dname, "Juniper") || strstr(dname, "Cypress") || strstr(dname, "Hemlock") || - strstr(dname, "Caicos") || + strstr(dname, "Caicos") || //AMD Radeon VLIW5 Gen 2 strstr(dname, "Turks") || strstr(dname, "Barts") || - strstr(dname, "Cayman") || - strstr(dname, "Antilles") || strstr(dname, "Wrestler") || + strstr(dname, "Ontario") || strstr(dname, "Zacate") || strstr(dname, "WinterPark") || - strstr(dname, "BeaverCreek"))) { + strstr(dname, "BeaverCreek") || + strstr(dname, "Cayman") || //AMD Radeon VLIW4 + strstr(dname, "Antilles") || + strstr(dname, "Devastator") || + strstr(dname, "R7") //AMD Radeon VLIW4 + )) { if (strstr(dname, "Cayman") || - strstr(dname, "Antilles")) + strstr(dname, "Antilles") || + strstr(dname, "Devastator")) return DEV_AMD_VLIW4; else return DEV_AMD_VLIW5; } else + //Cape Verde, Pitcairn, Tahiti, New Zealand, Malta, Bonaire return DEV_AMD_GCN; } return DEV_UNKNOWN; ```
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

V6

  • Cape Verde, Hainan, Oland, Pitcairn, Tahiti,

V7

  • Bonaire, Havaii, Kalindi, Mullins, Spectre, Spooky,

V8

  • Iceland
<!-- gh-comment-id:67757038 --> @ghost commented on GitHub (Dec 21, 2014): V6 - Cape Verde, Hainan, Oland, Pitcairn, Tahiti, V7 - Bonaire, Havaii, Kalindi, Mullins, Spectre, Spooky, V8 - Iceland
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

OK so v6 and up are GCN. Only VLIW5 and VLIW4 may run better vectorized. I'm currently running tests on well to see if any format runs better vectorized on Juniper.

<!-- gh-comment-id:67757081 --> @magnumripper commented on GitHub (Dec 21, 2014): OK so v6 and up are GCN. Only VLIW5 and VLIW4 _may_ run better vectorized. I'm currently running tests on well to see if _any_ format runs better vectorized on Juniper.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

So what IP version is Hawaii?

<!-- gh-comment-id:67757088 --> @magnumripper commented on GitHub (Dec 21, 2014): So what IP version is Hawaii?
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Oh, you wrote that, v7

<!-- gh-comment-id:67757092 --> @magnumripper commented on GitHub (Dec 21, 2014): Oh, you wrote that, v7
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

@jfoug does your devastator use to complain about register spilling, or is it just slow because of a low number of cores?

<!-- gh-comment-id:67757133 --> @magnumripper commented on GitHub (Dec 21, 2014): @jfoug does your devastator use to complain about register spilling, or is it just slow because of a low number of cores?
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

Updated:

diff --git a/src/common-opencl.c b/src/common-opencl.c
index 23271da..2b11373 100644
--- a/src/common-opencl.c
+++ b/src/common-opencl.c
@@ -2109,29 +2109,44 @@ cl_uint get_processor_family(int sequential_id)

    if gpu_amd(device_info[sequential_id]) {

-       if ((strstr(dname, "Cedar") ||
+       if ((strstr(dname, "Cedar") ||       //AMD Radeon VLIW5
            strstr(dname, "Redwood") ||
            strstr(dname, "Juniper") ||
            strstr(dname, "Cypress") ||
            strstr(dname, "Hemlock") ||
-           strstr(dname, "Caicos") ||
+           strstr(dname, "Caicos") ||   //AMD Radeon VLIW5 Gen 2
            strstr(dname, "Turks") ||
            strstr(dname, "Barts") ||
-           strstr(dname, "Cayman") ||
-           strstr(dname, "Antilles") ||
            strstr(dname, "Wrestler") ||
+           strstr(dname, "Ontario") ||
            strstr(dname, "Zacate") ||
            strstr(dname, "WinterPark") ||
-           strstr(dname, "BeaverCreek"))) {
+           strstr(dname, "BeaverCreek") ||
+           strstr(dname, "Cayman") ||  //AMD Radeon VLIW4
+           strstr(dname, "Antilles") ||
+           strstr(dname, "Devastator") ||
+           strstr(dname, "R7")         //AMD Radeon VLIW4
+           )) {

            if (strstr(dname, "Cayman") ||
-               strstr(dname, "Antilles"))
+               strstr(dname, "Antilles") ||
+               strstr(dname, "Devastator") ||
+               strstr(dname, "R7"))
                return DEV_AMD_VLIW4;
            else
                return DEV_AMD_VLIW5;

-       } else
+       } else {
+           /*
+           * Graphics IP v6:
+           *   - Cape Verde, Hainan, Oland, Pitcairn, Tahiti
+           * Graphics IP v7:
+           *   - Bonaire, Havaii, Kalindi, Mullins, Spectre, Spooky
+           * Graphics IP v8:
+           *   - Iceland
+           */
            return DEV_AMD_GCN;
+       }
    }
    return DEV_UNKNOWN;
 }
<!-- gh-comment-id:67757202 --> @ghost commented on GitHub (Dec 21, 2014): Updated: ``` diff --git a/src/common-opencl.c b/src/common-opencl.c index 23271da..2b11373 100644 --- a/src/common-opencl.c +++ b/src/common-opencl.c @@ -2109,29 +2109,44 @@ cl_uint get_processor_family(int sequential_id) if gpu_amd(device_info[sequential_id]) { - if ((strstr(dname, "Cedar") || + if ((strstr(dname, "Cedar") || //AMD Radeon VLIW5 strstr(dname, "Redwood") || strstr(dname, "Juniper") || strstr(dname, "Cypress") || strstr(dname, "Hemlock") || - strstr(dname, "Caicos") || + strstr(dname, "Caicos") || //AMD Radeon VLIW5 Gen 2 strstr(dname, "Turks") || strstr(dname, "Barts") || - strstr(dname, "Cayman") || - strstr(dname, "Antilles") || strstr(dname, "Wrestler") || + strstr(dname, "Ontario") || strstr(dname, "Zacate") || strstr(dname, "WinterPark") || - strstr(dname, "BeaverCreek"))) { + strstr(dname, "BeaverCreek") || + strstr(dname, "Cayman") || //AMD Radeon VLIW4 + strstr(dname, "Antilles") || + strstr(dname, "Devastator") || + strstr(dname, "R7") //AMD Radeon VLIW4 + )) { if (strstr(dname, "Cayman") || - strstr(dname, "Antilles")) + strstr(dname, "Antilles") || + strstr(dname, "Devastator") || + strstr(dname, "R7")) return DEV_AMD_VLIW4; else return DEV_AMD_VLIW5; - } else + } else { + /* + * Graphics IP v6: + * - Cape Verde, Hainan, Oland, Pitcairn, Tahiti + * Graphics IP v7: + * - Bonaire, Havaii, Kalindi, Mullins, Spectre, Spooky + * Graphics IP v8: + * - Iceland + */ return DEV_AMD_GCN; + } } return DEV_UNKNOWN; } ```
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

if any format runs better vectorized on Juniper

Do you have a light format vectorized? SHA1, for example?

<!-- gh-comment-id:67757247 --> @ghost commented on GitHub (Dec 21, 2014): > if any format runs better vectorized on Juniper Do you have a light format vectorized? SHA1, for example?
Author
Owner

@kholia commented on GitHub (Dec 21, 2014):

@claudioandre I have no GPU these days (switched countries earlier this earlier) ;(

<!-- gh-comment-id:67757252 --> @kholia commented on GitHub (Dec 21, 2014): @claudioandre I have no GPU these days (switched countries earlier this earlier) ;(
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Please put that patch on gist, I can't figure out the whitespaces (tabs) from here.

<!-- gh-comment-id:67757265 --> @magnumripper commented on GitHub (Dec 21, 2014): Please put that patch on gist, I can't figure out the whitespaces (tabs) from here.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

No I think no format that is currently transfer-bound has vectorization support.

<!-- gh-comment-id:67757274 --> @magnumripper commented on GitHub (Dec 21, 2014): No I think no format that is currently transfer-bound has vectorization support.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Please put that patch on gist, I can't figure out the whitespaces (tabs) from here.

Forget it, I got it when copying from edit mode

<!-- gh-comment-id:67757297 --> @magnumripper commented on GitHub (Dec 21, 2014): > Please put that patch on gist, I can't figure out the whitespaces (tabs) from here. Forget it, I got it when copying from edit mode
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

https://gist.github.com/claudioandre/a1079bee649756d92b43

<!-- gh-comment-id:67757302 --> @ghost commented on GitHub (Dec 21, 2014): https://gist.github.com/claudioandre/a1079bee649756d92b43
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

I really need to look into CodeXL. It's a pity I can't use it at home. Would you think Solar could agree to install that on the Openwall hosts?

<!-- gh-comment-id:67757366 --> @magnumripper commented on GitHub (Dec 21, 2014): I really need to look into CodeXL. It's a pity I can't use it at home. Would you think Solar could agree to install that on the Openwall hosts?
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

It replaces profiler; it is installed in his hosts.

<!-- gh-comment-id:67757382 --> @ghost commented on GitHub (Dec 21, 2014): It replaces profiler; it is installed in his hosts.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

It is? Wow, I'm retarded. How do I use it?

<!-- gh-comment-id:67757393 --> @magnumripper commented on GitHub (Dec 21, 2014): It is? Wow, I'm retarded. How do I use it?
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

Profiler is. It is not good as CodeXL. I am not aware of all its possibilities in command line.

<!-- gh-comment-id:67757411 --> @ghost commented on GitHub (Dec 21, 2014): Profiler is. It is not good as CodeXL. I am not aware of all its possibilities in command line.
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

Thanks @kholia

<!-- gh-comment-id:67757418 --> @ghost commented on GitHub (Dec 21, 2014): Thanks @kholia
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

I got this on well

Device 2: Juniper (AMD Radeon HD 6770 Green Edition)
OpenCL error (CL_INVALID_BUFFER_SIZE) in file (opencl_ntlmv2_fmt_plug.c) at line (141) - (Error creating page-locked buffer)

It uses pinned buffers but that (bug) is accounted for in opencl_init_auto_setup(). Not sure what is wrong.

<!-- gh-comment-id:67757528 --> @magnumripper commented on GitHub (Dec 21, 2014): I got this on well ``` Device 2: Juniper (AMD Radeon HD 6770 Green Edition) OpenCL error (CL_INVALID_BUFFER_SIZE) in file (opencl_ntlmv2_fmt_plug.c) at line (141) - (Error creating page-locked buffer) ``` It uses pinned buffers but that (bug) is accounted for in opencl_init_auto_setup(). Not sure what is wrong.
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

2M is too much. Any other important buffers?

gws:   1048576    23563564 c/s   259199208 rounds/s 177.999ms per crypt_all()
OpenCL error (CL_INVALID_BUFFER_SIZE) in file (opencl_ntlmv2_fmt_plug.c) at line (141) - (Error creating page-locked buffer)
<!-- gh-comment-id:67757636 --> @ghost commented on GitHub (Dec 21, 2014): 2M is too much. Any other important buffers? ``` gws: 1048576 23563564 c/s 259199208 rounds/s 177.999ms per crypt_all() OpenCL error (CL_INVALID_BUFFER_SIZE) in file (opencl_ntlmv2_fmt_plug.c) at line (141) - (Error creating page-locked buffer) ```
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

The largest allocation is plaintext_length and that is what we check for. For some reason even "4 * max_len" fails. I worked around it now setting gws_limit to 1M but something is wrong there.

<!-- gh-comment-id:67757672 --> @magnumripper commented on GitHub (Dec 21, 2014): The largest allocation is plaintext_length and that is what we check for. For some reason even "4 \* max_len" fails. I worked around it now setting gws_limit to 1M but something is wrong there.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Maybe it should be "2 * v_width * max_len"

<!-- gh-comment-id:67757719 --> @magnumripper commented on GitHub (Dec 21, 2014): Maybe it should be "2 \* v_width \* max_len"
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

Make sense.

<!-- gh-comment-id:67757730 --> @ghost commented on GitHub (Dec 21, 2014): Make sense.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

I wonder if more formats has that bug.

<!-- gh-comment-id:67757745 --> @magnumripper commented on GitHub (Dec 21, 2014): I wonder if more formats has that bug.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

I think there was but few were memory bound. 5a00183 fixes them.

<!-- gh-comment-id:67757824 --> @magnumripper commented on GitHub (Dec 21, 2014): I think there was but few were memory bound. 5a00183 fixes them.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Do you have a light format vectorized? SHA1, for example?

I think RAKP is pretty light and it does have vector support.

<!-- gh-comment-id:67758097 --> @magnumripper commented on GitHub (Dec 21, 2014): > Do you have a light format vectorized? SHA1, for example? I think RAKP is pretty light and it does have vector support.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

I missed fixing some. c73c0c2 should do the rest.

<!-- gh-comment-id:67758104 --> @magnumripper commented on GitHub (Dec 21, 2014): I missed fixing some. c73c0c2 should do the rest.
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

Ok, I will check it.

<!-- gh-comment-id:67758108 --> @ghost commented on GitHub (Dec 21, 2014): Ok, I will check it.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

F*ck, ntlmv2-opencl still fails despite using v_width

<!-- gh-comment-id:67758141 --> @magnumripper commented on GitHub (Dec 21, 2014): F*ck, ntlmv2-opencl still fails despite using v_width
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Well's old driver can do this

Benchmarking: office2013-opencl, MS Office 2013 (100,000 iterations) [SHA512 OpenCL 2x AES]... (8xOMP) DONE
Raw:    21.3 c/s real, 11.3 c/s virtual
<!-- gh-comment-id:67758220 --> @magnumripper commented on GitHub (Dec 21, 2014): Well's old driver can do this ``` Benchmarking: office2013-opencl, MS Office 2013 (100,000 iterations) [SHA512 OpenCL 2x AES]... (8xOMP) DONE Raw: 21.3 c/s real, 11.3 c/s virtual ```
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

RAKP also fails with CL_INVALID_BUFFER_SIZE. WTF is wrong?

<!-- gh-comment-id:67758237 --> @magnumripper commented on GitHub (Dec 21, 2014): RAKP also fails with CL_INVALID_BUFFER_SIZE. WTF is wrong?
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

OK, just hacking workarounds for ntlmv2 and rakp we got this

$ ../run/relbench -v juniper-s.txt juniper-v.txt
(...)
Ratio:  1.15406 real, 1.17261 virtual   PBKDF2-HMAC-SHA1-opencl:Raw
Ratio:  1.17748 real, 1.22909 virtual   RAKP-opencl, IPMI 2.0 RAKP (RMCP+):Many salts
Ratio:  1.15708 real, 1.17223 virtual   RAKP-opencl, IPMI 2.0 RAKP (RMCP+):Only one salt
Ratio:  1.10558 real, 1.11278 virtual   encfs-opencl, EncFS:Raw
Ratio:  1.12377 real, 1.11362 virtual   krb5pa-sha1-opencl, Kerberos 5 AS-REQ Pre-Auth etype 17/18:Raw
Ratio:  2.30797 real, 2.27428 virtual   ntlmv2-opencl, NTLMv2 C/R:Many salts
Ratio:  1.55751 real, 1.43351 virtual   ntlmv2-opencl, NTLMv2 C/R:Only one salt
Ratio:  1.76623 real, 1.75933 virtual   office2007-opencl, MS Office 2007 (50,000 iterations):Raw
Ratio:  1.77146 real, 1.74888 virtual   office2010-opencl, MS Office 2010 (100,000 iterations):Raw
Ratio:  0.06893 real, 0.06890 virtual   office2013-opencl, MS Office 2013 (100,000 iterations):Raw
Ratio:  1.11096 real, 1.10500 virtual   sha1crypt-opencl, (NetBSD):Raw
Ratio:  1.11199 real, 1.11693 virtual   wpapsk-opencl, WPA/WPA2 PSK:Raw

So only Office2013 is slower running vectorized.

<!-- gh-comment-id:67758277 --> @magnumripper commented on GitHub (Dec 21, 2014): OK, just hacking workarounds for ntlmv2 and rakp we got this ``` $ ../run/relbench -v juniper-s.txt juniper-v.txt (...) Ratio: 1.15406 real, 1.17261 virtual PBKDF2-HMAC-SHA1-opencl:Raw Ratio: 1.17748 real, 1.22909 virtual RAKP-opencl, IPMI 2.0 RAKP (RMCP+):Many salts Ratio: 1.15708 real, 1.17223 virtual RAKP-opencl, IPMI 2.0 RAKP (RMCP+):Only one salt Ratio: 1.10558 real, 1.11278 virtual encfs-opencl, EncFS:Raw Ratio: 1.12377 real, 1.11362 virtual krb5pa-sha1-opencl, Kerberos 5 AS-REQ Pre-Auth etype 17/18:Raw Ratio: 2.30797 real, 2.27428 virtual ntlmv2-opencl, NTLMv2 C/R:Many salts Ratio: 1.55751 real, 1.43351 virtual ntlmv2-opencl, NTLMv2 C/R:Only one salt Ratio: 1.76623 real, 1.75933 virtual office2007-opencl, MS Office 2007 (50,000 iterations):Raw Ratio: 1.77146 real, 1.74888 virtual office2010-opencl, MS Office 2010 (100,000 iterations):Raw Ratio: 0.06893 real, 0.06890 virtual office2013-opencl, MS Office 2013 (100,000 iterations):Raw Ratio: 1.11096 real, 1.10500 virtual sha1crypt-opencl, (NetBSD):Raw Ratio: 1.11199 real, 1.11693 virtual wpapsk-opencl, WPA/WPA2 PSK:Raw ``` So only Office2013 is slower running vectorized.
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

It is safe to try 2x?

I see something bad here.

GWS=524288 ../run/john -te:5 -form=rakp-opencl -verb=5 [--force-scalar]

Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 4x]... DONE, GPU util:80%
Many salts: 8738K c/s real, 183500K c/s virtual
Only one salt:  7073K c/s real, 31001K c/s virtual

Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL]... DONE, GPU util:39%
Many salts: 61027K c/s real, 149576K c/s virtual
Only one salt:  20887K c/s real, 26214K c/s virtual

Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 2x]... DONE, GPU util:36%
Many salts: 73379K c/s real, 200597K c/s virtual
Only one salt:  25065K c/s real, 32017K c/s virtual

<!-- gh-comment-id:67758317 --> @ghost commented on GitHub (Dec 21, 2014): It is safe to try 2x? I see something bad here. ``` GWS=524288 ../run/john -te:5 -form=rakp-opencl -verb=5 [--force-scalar] Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 4x]... DONE, GPU util:80% Many salts: 8738K c/s real, 183500K c/s virtual Only one salt: 7073K c/s real, 31001K c/s virtual Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL]... DONE, GPU util:39% Many salts: 61027K c/s real, 149576K c/s virtual Only one salt: 20887K c/s real, 26214K c/s virtual Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 2x]... DONE, GPU util:36% Many salts: 73379K c/s real, 200597K c/s virtual Only one salt: 25065K c/s real, 32017K c/s virtual ```
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Hmm does your Juniper differ from Well's? Or is it the driver?

<!-- gh-comment-id:67758336 --> @magnumripper commented on GitHub (Dec 21, 2014): Hmm does your Juniper differ from Well's? Or is it the driver?
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

I added this to Office2013 but it does not have any effect on Well's Juniper:

diff --git a/src/opencl_office2013_fmt_plug.c b/src/opencl_office2013_fmt_plug.c
index 651ef29..e7e60c6 100644
--- a/src/opencl_office2013_fmt_plug.c
+++ b/src/opencl_office2013_fmt_plug.c
@@ -302,6 +302,7 @@ static void init(struct fmt_main *self)
        char build_opts[64];
        static char valgo[32] = "";

+       if (!amd_vliw5(device_info[gpu_id]))
        if ((v_width = opencl_get_vector_width(gpu_id,
                                               sizeof(cl_long))) > 1) {
                /* Run vectorized kernel */
<!-- gh-comment-id:67758352 --> @magnumripper commented on GitHub (Dec 21, 2014): I added this to Office2013 but it does not have any effect on Well's Juniper: ``` diff --git a/src/opencl_office2013_fmt_plug.c b/src/opencl_office2013_fmt_plug.c index 651ef29..e7e60c6 100644 --- a/src/opencl_office2013_fmt_plug.c +++ b/src/opencl_office2013_fmt_plug.c @@ -302,6 +302,7 @@ static void init(struct fmt_main *self) char build_opts[64]; static char valgo[32] = ""; + if (!amd_vliw5(device_info[gpu_id])) if ((v_width = opencl_get_vector_width(gpu_id, sizeof(cl_long))) > 1) { /* Run vectorized kernel */ ```
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

The driver for sure. Mine is a raw board (no millennium/plus/mega edition).

<!-- gh-comment-id:67758366 --> @ghost commented on GitHub (Dec 21, 2014): The driver for sure. Mine is a raw board (no millennium/plus/mega edition).
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

I'm probably too tired to do anything clever now. Good night.

<!-- gh-comment-id:67758373 --> @magnumripper commented on GitHub (Dec 21, 2014): I'm probably too tired to do anything clever now. Good night.
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

init() loads gpu_id later, so you have to start opencl stuff by hand (to get details so soon).

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- HEAD
+++ Modificado na Árvore de Trabalho
@@ -302,6 +302,9 @@
    char build_opts[64];
    static char valgo[32] = "";

+   opencl_prepare_dev(gpu_id);
+
+   if (!amd_vliw5(device_info[gpu_id]))
    if ((v_width = opencl_get_vector_width(gpu_id,
                                           sizeof(cl_long))) > 1) {
        /* Run vectorized kernel */
<!-- gh-comment-id:67758512 --> @ghost commented on GitHub (Dec 21, 2014): init() loads gpu_id later, so you have to start opencl stuff by hand (to get details so soon). ``` # This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- HEAD +++ Modificado na Árvore de Trabalho @@ -302,6 +302,9 @@ char build_opts[64]; static char valgo[32] = ""; + opencl_prepare_dev(gpu_id); + + if (!amd_vliw5(device_info[gpu_id])) if ((v_width = opencl_get_vector_width(gpu_id, sizeof(cl_long))) > 1) { /* Run vectorized kernel */ ```
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

This is added in f856c22 and tweaked in c4fca84. But I also tried letting auto-tune run up to 60s of crypt_all() and that ended up with vectorized 21% faster than scalar (still on well's Juniper). We can't live with such slow crypts unless we start lower and tune it up after the self tests so for now, the above patch is what we'll use.

<!-- gh-comment-id:67781481 --> @magnumripper commented on GitHub (Dec 21, 2014): This is added in f856c22 and tweaked in c4fca84. But I also tried letting auto-tune run up to 60s of crypt_all() and that ended up with vectorized 21% faster than scalar (still on well's Juniper). We can't live with such slow crypts unless we start lower and tune it up after the self tests so for now, the above patch is what we'll use.
Author
Owner

@ghost commented on GitHub (Dec 21, 2014):

I updated the bech results seen above:

  • the best for rakp is [2x]

Observations:

  • we have to redo this test using openwall's board and the latest driver in order to understand what is going on (I mean, why are you seeing something different?). CodeXL tells me the same history.

image

image

image

<!-- gh-comment-id:67784267 --> @ghost commented on GitHub (Dec 21, 2014): I updated the bech results seen above: - the best for rakp is [2x] Observations: - we have to redo this test using openwall's board and the latest driver in order to understand what is going on (I mean, why are you seeing something different?). CodeXL tells me the same history. ![image](https://cloud.githubusercontent.com/assets/1702923/5519560/2eb6961e-8942-11e4-93ef-1455cccd899e.png) ![image](https://cloud.githubusercontent.com/assets/1702923/5519562/3e1fbc34-8942-11e4-861c-3c816ddc8880.png) ![image](https://cloud.githubusercontent.com/assets/1702923/5519569/4d03008a-8942-11e4-9203-c389f4cf460a.png)
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Well

$ for i in 1 2 3 4 ; do ../run/john -test -form:rakp-opencl -dev=2 --force-vector-width=$i ; done
Device 2: Juniper (AMD Radeon HD 6770 Green Edition)
Local worksize (LWS) 64, global worksize (GWS) 1048576
Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL]... DONE
Many salts: 37008K c/s real, 18061K c/s virtual
Only one salt:  23878K c/s real, 9803K c/s virtual

Device 2: Juniper (AMD Radeon HD 6770 Green Edition)
Local worksize (LWS) 64, global worksize (GWS) 524288
Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 2x]... DONE
Many salts: 47185K c/s real, 22685K c/s virtual
Only one salt:  27756K c/s real, 11146K c/s virtual

Warning: vector width 3 is not expected to work well with all formats
Device 2: Juniper (AMD Radeon HD 6770 Green Edition)
Local worksize (LWS) 128, global worksize (GWS) 262144
Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 3x]... DONE
Many salts: 38153K c/s real, 18797K c/s virtual
Only one salt:  23901K c/s real, 9910K c/s virtual

Device 2: Juniper (AMD Radeon HD 6770 Green Edition)
Local worksize (LWS) 64, global worksize (GWS) 131072
Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 4x]... DONE
Many salts: 39845K c/s real, 18974K c/s virtual
Only one salt:  25165K c/s real, 10356K c/s virtual
<!-- gh-comment-id:67784514 --> @magnumripper commented on GitHub (Dec 21, 2014): Well ``` $ for i in 1 2 3 4 ; do ../run/john -test -form:rakp-opencl -dev=2 --force-vector-width=$i ; done Device 2: Juniper (AMD Radeon HD 6770 Green Edition) Local worksize (LWS) 64, global worksize (GWS) 1048576 Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL]... DONE Many salts: 37008K c/s real, 18061K c/s virtual Only one salt: 23878K c/s real, 9803K c/s virtual Device 2: Juniper (AMD Radeon HD 6770 Green Edition) Local worksize (LWS) 64, global worksize (GWS) 524288 Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 2x]... DONE Many salts: 47185K c/s real, 22685K c/s virtual Only one salt: 27756K c/s real, 11146K c/s virtual Warning: vector width 3 is not expected to work well with all formats Device 2: Juniper (AMD Radeon HD 6770 Green Edition) Local worksize (LWS) 128, global worksize (GWS) 262144 Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 3x]... DONE Many salts: 38153K c/s real, 18797K c/s virtual Only one salt: 23901K c/s real, 9910K c/s virtual Device 2: Juniper (AMD Radeon HD 6770 Green Edition) Local worksize (LWS) 64, global worksize (GWS) 131072 Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 4x]... DONE Many salts: 39845K c/s real, 18974K c/s virtual Only one salt: 25165K c/s real, 10356K c/s virtual ```
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Hmm that addition of opencl_prepare_dev(gpu_id); has the effect on my Macbook that device names are printed twice. Very disturbing. But that does not happen on well or super. Now how can I get rid of that...

<!-- gh-comment-id:67789565 --> @magnumripper commented on GitHub (Dec 21, 2014): Hmm that addition of `opencl_prepare_dev(gpu_id);` has the effect on my Macbook that device names are printed twice. Very disturbing. But that does not happen on well or super. Now how can I get rid of that...
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

$ ../run/john -form=rakp-opencl -test -dev=2
Device 2: GeForce GT 650M
Device 2: GeForce GT 650M
Local worksize (LWS) 1024, global worksize (GWS) 2097152
Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL]... DONE
Many salts: 18324K c/s real, 377487K c/s virtual
Only one salt:  13345K c/s real, 47355K c/s virtual

I wonder why it happens. Or why it doesn't happen on the others...

<!-- gh-comment-id:67789634 --> @magnumripper commented on GitHub (Dec 21, 2014): ``` $ ../run/john -form=rakp-opencl -test -dev=2 Device 2: GeForce GT 650M Device 2: GeForce GT 650M Local worksize (LWS) 1024, global worksize (GWS) 2097152 Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL]... DONE Many salts: 18324K c/s real, 377487K c/s virtual Only one salt: 13345K c/s real, 47355K c/s virtual ``` I wonder why it happens. Or why it doesn't happen on the others...
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Using opencl_preinit() instead fixed it!

<!-- gh-comment-id:67789752 --> @magnumripper commented on GitHub (Dec 21, 2014): Using opencl_preinit() instead fixed it!
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

Well's Juniper at 2x vs 4x (1.22951 means 2x is 23% faster than 4x)

Ratio:  1.22951 real, 1.22827 virtual   PBKDF2-HMAC-SHA1-opencl:Raw
Ratio:  1.33011 real, 1.38697 virtual   RAKP-opencl, IPMI 2.0 RAKP (RMCP+):Many salts
Ratio:  1.11406 real, 1.10336 virtual   RAKP-opencl, IPMI 2.0 RAKP (RMCP+):Only one salt
Ratio:  1.20863 real, 1.18855 virtual   encfs-opencl, EncFS:Raw
Ratio:  1.25495 real, 1.24319 virtual   krb5pa-sha1-opencl, Kerberos 5 AS-REQ Pre-Auth etype 17/18:Raw
Ratio:  0.72195 real, 0.71357 virtual   ntlmv2-opencl, NTLMv2 C/R:Many salts
Ratio:  0.84482 real, 0.88151 virtual   ntlmv2-opencl, NTLMv2 C/R:Only one salt
Ratio:  0.95082 real, 0.94940 virtual   office2007-opencl, MS Office 2007 (50,000 iterations):Raw
Ratio:  0.97674 real, 0.96303 virtual   office2010-opencl, MS Office 2010 (100,000 iterations):Raw
Ratio:  1.27077 real, 1.26526 virtual   sha1crypt-opencl, (NetBSD):Raw
Ratio:  1.26905 real, 1.24269 virtual   wpapsk-opencl, WPA/WPA2 PSK:Raw

I already changed RAKP in 2107223 to pick 2x for VLIW5. I will do the same for the rest except ntlmv2 (now that is a light format) and the office2007/2010 ones.

<!-- gh-comment-id:67790169 --> @magnumripper commented on GitHub (Dec 21, 2014): Well's Juniper at 2x vs 4x (1.22951 means 2x is 23% faster than 4x) ``` Ratio: 1.22951 real, 1.22827 virtual PBKDF2-HMAC-SHA1-opencl:Raw Ratio: 1.33011 real, 1.38697 virtual RAKP-opencl, IPMI 2.0 RAKP (RMCP+):Many salts Ratio: 1.11406 real, 1.10336 virtual RAKP-opencl, IPMI 2.0 RAKP (RMCP+):Only one salt Ratio: 1.20863 real, 1.18855 virtual encfs-opencl, EncFS:Raw Ratio: 1.25495 real, 1.24319 virtual krb5pa-sha1-opencl, Kerberos 5 AS-REQ Pre-Auth etype 17/18:Raw Ratio: 0.72195 real, 0.71357 virtual ntlmv2-opencl, NTLMv2 C/R:Many salts Ratio: 0.84482 real, 0.88151 virtual ntlmv2-opencl, NTLMv2 C/R:Only one salt Ratio: 0.95082 real, 0.94940 virtual office2007-opencl, MS Office 2007 (50,000 iterations):Raw Ratio: 0.97674 real, 0.96303 virtual office2010-opencl, MS Office 2010 (100,000 iterations):Raw Ratio: 1.27077 real, 1.26526 virtual sha1crypt-opencl, (NetBSD):Raw Ratio: 1.26905 real, 1.24269 virtual wpapsk-opencl, WPA/WPA2 PSK:Raw ``` I already changed RAKP in 2107223 to pick 2x for VLIW5. I will do the same for the rest except ntlmv2 (now that is a light format) and the office2007/2010 ones.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

So your Juniper should look less weak now! I just hope this did not set back a 5970's performance. But it should have the same core, just more of them I guess. So this should be proper for all.

<!-- gh-comment-id:67790655 --> @magnumripper commented on GitHub (Dec 21, 2014): So your Juniper should look less weak now! I just hope this did not set back a 5970's performance. But it should have the same core, just more of them I guess. So this should be proper for all.
Author
Owner

@magnumripper commented on GitHub (Dec 21, 2014):

This issue was totally owned :-P it is supposed to be about running oldoffice on older drivers!

<!-- gh-comment-id:67790710 --> @magnumripper commented on GitHub (Dec 21, 2014): This issue was totally owned :-P it is supposed to be about running oldoffice on older drivers!
Author
Owner

@ghost commented on GitHub (Dec 22, 2014):

Now it is: DES and hmac-sha512

2 out of 47 tests have FAILED
<!-- gh-comment-id:67833640 --> @ghost commented on GitHub (Dec 22, 2014): Now it is: DES and hmac-sha512 ``` 2 out of 47 tests have FAILED ```
Author
Owner

@ghost commented on GitHub (Dec 22, 2014):

I wonder why it happens. Or why it doesn't happen on the others...

It happens here, are you sure it is not happening in openwalls machines? This is caused by a second call of init. I use this strategy in SHA512crypt, and my way to go is: opencl_prepare_dev() and latter only X_build_kernel(). No need to opencl_init().

Anyway, pre_init() followed by a opencl_init() is good enough.

$ ../run/john -te:5 -form=rakp-opencl 
Device 0: Juniper (AMD Radeon HD 6700 Series)
Device 0: Juniper (AMD Radeon HD 6700 Series)
Local worksize (LWS) 64, global worksize (GWS) 262144
Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 2x]... DONE, GPU util:31%
Many salts: 68367K c/s real, 116667K c/s virtual
Only one salt:  20185K c/s real, 23095K c/s virtual
<!-- gh-comment-id:67835170 --> @ghost commented on GitHub (Dec 22, 2014): > I wonder why it happens. Or why it doesn't happen on the others... It happens here, are you sure it is not happening in openwalls machines? This is caused by a second call of init. I use this strategy in SHA512crypt, and my way to go is: opencl_prepare_dev() and latter only X_build_kernel(). No need to opencl_init(). Anyway, pre_init() followed by a opencl_init() is good enough. ``` $ ../run/john -te:5 -form=rakp-opencl Device 0: Juniper (AMD Radeon HD 6700 Series) Device 0: Juniper (AMD Radeon HD 6700 Series) Local worksize (LWS) 64, global worksize (GWS) 262144 Benchmarking: RAKP-opencl, IPMI 2.0 RAKP (RMCP+) [HMAC-SHA1 OpenCL 2x]... DONE, GPU util:31% Many salts: 68367K c/s real, 116667K c/s virtual Only one salt: 20185K c/s real, 23095K c/s virtual ```
Author
Owner

@ghost commented on GitHub (Dec 22, 2014):

Anyway, pre_init() followed by a opencl_init() is good enough.

Everything is ok with a --fork run, right?

<!-- gh-comment-id:67841353 --> @ghost commented on GitHub (Dec 22, 2014): > Anyway, pre_init() followed by a opencl_init() is good enough. Everything is ok with a --fork run, right?
Author
Owner

@magnumripper commented on GitHub (Dec 22, 2014):

Everything is ok with a --fork run, right?

I hope so - prior to this change we just called opencl_get_vector_width() which in turn calls opencl_preinit() so if that interferes with --fork we have a big problem.

<!-- gh-comment-id:67886657 --> @magnumripper commented on GitHub (Dec 22, 2014): > Everything is ok with a --fork run, right? I hope so - prior to this change we just called opencl_get_vector_width() which in turn calls opencl_preinit() so if that interferes with --fork we have a big problem.
Author
Owner

@magnumripper commented on GitHub (Dec 22, 2014):

Now it is: DES and hmac-sha512

Did pbkdf2-hmac-sha512 break due to the bump of SEED to 256? Please try resetting it to 64 and see if it works again.

<!-- gh-comment-id:67886914 --> @magnumripper commented on GitHub (Dec 22, 2014): > Now it is: DES and hmac-sha512 Did pbkdf2-hmac-sha512 break due to the bump of SEED to 256? Please try resetting it to 64 and see if it works again.
Author
Owner

@ghost commented on GitHub (Dec 22, 2014):

This is a test=0. SEED cannot hurt.

And LWS=1 GWS=1 fails.

<!-- gh-comment-id:67887286 --> @ghost commented on GitHub (Dec 22, 2014): This is a test=0. SEED cannot hurt. And LWS=1 GWS=1 fails.
Author
Owner

@magnumripper commented on GitHub (Dec 22, 2014):

But nothing else of significance was changed!

<!-- gh-comment-id:67887481 --> @magnumripper commented on GitHub (Dec 22, 2014): But nothing else of significance was changed!
Author
Owner

@ghost commented on GitHub (Dec 22, 2014):

It was failing in my original test above. No idea if it was running some time ago (14.9, for example).

<!-- gh-comment-id:67887617 --> @ghost commented on GitHub (Dec 22, 2014): It was failing in my original test above. No idea if it was running some time ago (14.9, for example).
Author
Owner

@magnumripper commented on GitHub (Dec 22, 2014):

Oh, right! I was confused. So we got RAKP, WPAPSK and Office2013 working now, but DEScrypt and PBKDF2-HMAC-SHA512 still fails. BTW I hope 221263f did not make anything worse? I tested it quite a lot.

<!-- gh-comment-id:67900643 --> @magnumripper commented on GitHub (Dec 22, 2014): Oh, right! I was confused. So we got RAKP, WPAPSK and Office2013 working now, but DEScrypt and PBKDF2-HMAC-SHA512 still fails. BTW I hope 221263f did not make anything worse? I tested it quite a lot.
Author
Owner

@ghost commented on GitHub (Dec 23, 2014):

221263fbd5 is a choice with pros and cons. But, it does not create anything bad.

<!-- gh-comment-id:67909777 --> @ghost commented on GitHub (Dec 23, 2014): 221263fbd592884a03fd8e31e24ab51f56692073 is a choice with pros and cons. But, it does not create anything bad.
Author
Owner

@magnumripper commented on GitHub (Mar 18, 2015):

They needed a workaround for a workaround. Now that's AMD.

diff --git a/src/opencl_rc4.h b/src/opencl_rc4.h
index fb32a73..f750731 100644
--- a/src/opencl_rc4.h
+++ b/src/opencl_rc4.h
@@ -22,7 +22,8 @@

 // None 2885 626 13860 8097
 #define RC4_IV32 // 3633 696 14278 8118
-#if !gpu_amd(DEVICE_INFO) /* bug in Catalyst 14.9, besides it is slower */
+#if !gpu_amd(DEVICE_INFO) || DEV_VER_MAJOR < 1445
+/* bug in Catalyst 14.9, besides it is slower */
 #define RC4_UNROLLED_KEY // 3893 817 14340 7245
 #define RC4_UNROLLED // 3932 848 14348 7847
 #endif
<!-- gh-comment-id:83219797 --> @magnumripper commented on GitHub (Mar 18, 2015): They needed a workaround for a workaround. Now that's AMD. ``` patch diff --git a/src/opencl_rc4.h b/src/opencl_rc4.h index fb32a73..f750731 100644 --- a/src/opencl_rc4.h +++ b/src/opencl_rc4.h @@ -22,7 +22,8 @@ // None 2885 626 13860 8097 #define RC4_IV32 // 3633 696 14278 8118 -#if !gpu_amd(DEVICE_INFO) /* bug in Catalyst 14.9, besides it is slower */ +#if !gpu_amd(DEVICE_INFO) || DEV_VER_MAJOR < 1445 +/* bug in Catalyst 14.9, besides it is slower */ #define RC4_UNROLLED_KEY // 3893 817 14340 7245 #define RC4_UNROLLED // 3932 848 14348 7847 #endif ```
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#509
No description provided.