Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 25 Dec 2012 18:57:44 +0100
From: magnum <>
Subject: Re: Opencl build from binary

On 19 Dec, 2012, at 20:28 , magnum <> wrote:
> On 19 Dec, 2012, at 18:01 , Claudio André <> 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/", ocl_gpu_id, platform_id);
>> To:
>> opencl_init_dev(ocl_gpu_id, platform_id);
>> opencl_build_kernel_save("$JOHN/", ocl_gpu_id, magumOptions=NULL, saveBinary=1, warnAboutCompilation=1);
> I have committed this.

After making all my formats use this caching feature (which shaves 10 seconds off wpapsk & krb5pa-sha1 init on my laptop) I realized that some formats, most notably the ntlmv2-opencl, must not use a cached binary unless the compile options match. So I just committed adding the options (if supplied) to the file name. It doesn't look pretty but it works fine. Here is an example of binary name: "ntlmv2_kernel_-DKEYBUF_SIZE=9 -DENC_ISO_8859_1 -DENCODING=ISO_8859_1GeForce GT 650M.bin". Maybe we should strip all spaces from the name, or replace them with underscores, but this would only be cosmetical.

BTW I have also changed opencl_init_opt() to always use that caching (save=1, warn=0). Saved me from changing all my formats :)


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.