mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #908] See if we can get oldoffice-opencl working w/ ancient Catalyst drivers #509
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#509
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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))"
@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.
@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 😝
@magnumripper commented on GitHub (Dec 18, 2014):
And what's that, 14.9? 14.6?
@ghost commented on GitHub (Dec 18, 2014):
1573.4 (14.9, I guess)
@ghost commented on GitHub (Dec 18, 2014):
4 out of 46 tests have FAILED
The first format is just too agressive [2x] for my board.
And DES is disabled (go to problems).
@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?@ghost commented on GitHub (Dec 19, 2014):
It did. Anyway, it does now with 14.12.
@ghost commented on GitHub (Dec 19, 2014):
The same result is seen.
And DES
@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?
@ghost commented on GitHub (Dec 19, 2014):
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):
@ghost 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.
You can analyse this with CodeXL. But this is time consuming, you have to analyse all compilation results.
@magnumripper commented on GitHub (Dec 19, 2014):
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
@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.
@magnumripper commented on GitHub (Dec 19, 2014):
@claudioandre what is the driver version reported by --list=opencl-devices for 14.12?
@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
@ghost commented on GitHub (Dec 19, 2014):
@ghost commented on GitHub (Dec 19, 2014):
In 'scalar mode' you avoid spills. And you "can double" occupancy.
@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?
@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.
@ghost commented on GitHub (Dec 19, 2014):
Not exactly (good registers numbers don't mean better performance). But, using 700+ ScratchRegs probably is not acceptable.
@magnumripper commented on GitHub (Dec 19, 2014):
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.
@magnumripper commented on GitHub (Dec 19, 2014):
I created a wiki page for the version number mess
@magnumripper commented on GitHub (Dec 19, 2014):
All of them has that, except Cayman. It has 300+. What exact tool are you running? Is this on Linux?
@ghost commented on GitHub (Dec 19, 2014):
CodeXL: (also) for Linux. I got these on Ubuntu LTS 14.04, Catalyst 14.12.
@magnumripper commented on GitHub (Dec 19, 2014):
That looks great, I should try to install it somewhere.
@magnumripper commented on GitHub (Dec 19, 2014):
Could that be translated to something we have, like VLIW4?
@ghost commented on GitHub (Dec 20, 2014):
Cayman, Devastator and Scrapper are VLIW4 (somehow better than [Juniper] VLIW5).
@ghost commented on GitHub (Dec 20, 2014):
To be confirmed...
@magnumripper commented on GitHub (Dec 20, 2014):
that is so... unintuitive.
@magnumripper commented on GitHub (Dec 20, 2014):
So maybe I should never use vectors for VLIW5.
@ghost commented on GitHub (Dec 20, 2014):
It is a bad thing that the '4' and '5' in VLIW* mean something.
A safe choice.
@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?
@ghost commented on GitHub (Dec 20, 2014):
For example
@magnumripper commented on GitHub (Dec 20, 2014):
That was easy :-)
@magnumripper commented on GitHub (Dec 21, 2014):
Hmm but older flagships like 5970/5990 is VLIW5 too. Are all VLIW5 register starved?
@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:
@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?
@ghost commented on GitHub (Dec 21, 2014):
Test now. @kholia, could you please do that?
@magnumripper commented on GitHub (Dec 21, 2014):
Found that mail. He ran a Cayman. It did complain about register spilling but performance went from 16K to 24K c/s.
@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?
@ghost commented on GitHub (Dec 21, 2014):
BTW, i will submit:
@ghost commented on GitHub (Dec 21, 2014):
V6
V7
V8
@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.
@magnumripper commented on GitHub (Dec 21, 2014):
So what IP version is Hawaii?
@magnumripper commented on GitHub (Dec 21, 2014):
Oh, you wrote that, v7
@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?
@ghost commented on GitHub (Dec 21, 2014):
Updated:
@ghost commented on GitHub (Dec 21, 2014):
Do you have a light format vectorized? SHA1, for example?
@kholia commented on GitHub (Dec 21, 2014):
@claudioandre I have no GPU these days (switched countries earlier this earlier) ;(
@magnumripper commented on GitHub (Dec 21, 2014):
Please put that patch on gist, I can't figure out the whitespaces (tabs) from here.
@magnumripper commented on GitHub (Dec 21, 2014):
No I think no format that is currently transfer-bound has vectorization support.
@magnumripper commented on GitHub (Dec 21, 2014):
Forget it, I got it when copying from edit mode
@ghost commented on GitHub (Dec 21, 2014):
https://gist.github.com/claudioandre/a1079bee649756d92b43
@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?
@ghost commented on GitHub (Dec 21, 2014):
It replaces profiler; it is installed in his hosts.
@magnumripper commented on GitHub (Dec 21, 2014):
It is? Wow, I'm retarded. How do I use it?
@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.
@ghost commented on GitHub (Dec 21, 2014):
Thanks @kholia
@magnumripper commented on GitHub (Dec 21, 2014):
I got this on well
It uses pinned buffers but that (bug) is accounted for in opencl_init_auto_setup(). Not sure what is wrong.
@ghost commented on GitHub (Dec 21, 2014):
2M is too much. Any other important buffers?
@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.
@magnumripper commented on GitHub (Dec 21, 2014):
Maybe it should be "2 * v_width * max_len"
@ghost commented on GitHub (Dec 21, 2014):
Make sense.
@magnumripper commented on GitHub (Dec 21, 2014):
I wonder if more formats has that bug.
@magnumripper commented on GitHub (Dec 21, 2014):
I think there was but few were memory bound.
5a00183fixes them.@magnumripper commented on GitHub (Dec 21, 2014):
I think RAKP is pretty light and it does have vector support.
@magnumripper commented on GitHub (Dec 21, 2014):
I missed fixing some.
c73c0c2should do the rest.@ghost commented on GitHub (Dec 21, 2014):
Ok, I will check it.
@magnumripper commented on GitHub (Dec 21, 2014):
F*ck, ntlmv2-opencl still fails despite using v_width
@magnumripper commented on GitHub (Dec 21, 2014):
Well's old driver can do this
@magnumripper commented on GitHub (Dec 21, 2014):
RAKP also fails with CL_INVALID_BUFFER_SIZE. WTF is wrong?
@magnumripper commented on GitHub (Dec 21, 2014):
OK, just hacking workarounds for ntlmv2 and rakp we got this
So only Office2013 is slower running vectorized.
@ghost commented on GitHub (Dec 21, 2014):
It is safe to try 2x?
I see something bad here.
@magnumripper commented on GitHub (Dec 21, 2014):
Hmm does your Juniper differ from Well's? Or is it the driver?
@magnumripper commented on GitHub (Dec 21, 2014):
I added this to Office2013 but it does not have any effect on Well's Juniper:
@ghost commented on GitHub (Dec 21, 2014):
The driver for sure. Mine is a raw board (no millennium/plus/mega edition).
@magnumripper commented on GitHub (Dec 21, 2014):
I'm probably too tired to do anything clever now. Good night.
@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).
@magnumripper commented on GitHub (Dec 21, 2014):
This is added in
f856c22and tweaked inc4fca84. 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.@ghost commented on GitHub (Dec 21, 2014):
I updated the bech results seen above:
Observations:
@magnumripper commented on GitHub (Dec 21, 2014):
Well
@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...@magnumripper commented on GitHub (Dec 21, 2014):
I wonder why it happens. Or why it doesn't happen on the others...
@magnumripper commented on GitHub (Dec 21, 2014):
Using opencl_preinit() instead fixed it!
@magnumripper commented on GitHub (Dec 21, 2014):
Well's Juniper at 2x vs 4x (1.22951 means 2x is 23% faster than 4x)
I already changed RAKP in
2107223to 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.@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.
@magnumripper commented on GitHub (Dec 21, 2014):
This issue was totally owned :-P it is supposed to be about running oldoffice on older drivers!
@ghost commented on GitHub (Dec 22, 2014):
Now it is: DES and hmac-sha512
@ghost commented on GitHub (Dec 22, 2014):
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.
@ghost commented on GitHub (Dec 22, 2014):
Everything is ok with a --fork run, right?
@magnumripper commented on GitHub (Dec 22, 2014):
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.
@magnumripper commented on GitHub (Dec 22, 2014):
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.
@ghost commented on GitHub (Dec 22, 2014):
This is a test=0. SEED cannot hurt.
And LWS=1 GWS=1 fails.
@magnumripper commented on GitHub (Dec 22, 2014):
But nothing else of significance was changed!
@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).
@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
221263fdid not make anything worse? I tested it quite a lot.@ghost commented on GitHub (Dec 23, 2014):
221263fbd5is a choice with pros and cons. But, it does not create anything bad.@magnumripper commented on GitHub (Mar 18, 2015):
They needed a workaround for a workaround. Now that's AMD.