Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 19 Dec 2012 20:28:37 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Opencl build from binary

On 19 Dec, 2012, at 18:01 , Claudio André <claudioandre.br@...il.com> wrote:
> Em 18-12-2012 17:39, magnum escreveu:
>> From a quick look at opencl_cryptsha512_fmt.c in your repo, I wonder why you didn't make more of it shared? The format could just call opencl_build_kernel() and the common code could use the binary if available, transparent to the format. However, I guess we need some kind of version-control. Or is there already? I didn't look very closely. It could be like
> 
> I tried to do something not invasive in common-opencl. Now one (only if he wants to use new functionality) have to change source code:
> 
> From:
> opencl_init("$JOHN/cryptmd5_kernel.cl", ocl_gpu_id, platform_id);
> 
> To:
> opencl_init_dev(ocl_gpu_id, platform_id);
> opencl_build_kernel_save("$JOHN/cryptmd5_kernel.cl", ocl_gpu_id, magumOptions=NULL, saveBinary=1, warnAboutCompilation=1);

I have committed this. I think we should take this opportunity to think about another thing now that we hack around in there anyway: How can we support using multiple devices? Sayantan's mscash2 supports multiple devices already, but only by hacking the format source. We should add proper support using --platform and --device.

Maybe we should drop the --platform notation though? On Bull (where nvidia is device #0), that would mean the Tahiti would become device #1 instead of "platform 1, device 0" and the CPUs would become device #2.
And maybe we should start from 1 instead - I think Hashcat would list them as device 1 and 2 with no platform notation.

Having done that, the syntax for multiple devices becomes much easier. You could say --device=1 or --device=1,2 and perhaps even ranges like --device=1-8 for vcl use. If we wanted to we could also support types, so --device=gpus would mean "use all available GPU devices".

That's for the options syntax. Now, how would a format use this, or know about this? Should we support using a group of heterogenous devices? What would a well thought out interface to common-opencl.c look like?

magnum

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ