Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <445ea1b603997dbce7a64f22f6d2d533@smtp.hushmail.com>
Date: Mon, 14 Jan 2013 01:17:16 +0100
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Changes to common-opencl.c

On 14 Jan, 2013, at 0:59 , Claudio André <claudioandre.br@...il.com> wrote:
> Em 13-01-2013 21:39, magnum escreveu:
>> 
>> I can have a go at the parsing if you want. I really think we should use the provided getopt stuff if it can help us at all, and in this case it seems it has exactly the functionality needed.
> 
> Please do!
> 
>> Given --device=1,2, what should the parser do? Fill an array somewhere?
> 
> Fill a new array. For example, in common-opencl.h
> int ocl_device_list[MAXGPUS];

Apparently what I get from getopt will be a "struct listmain *gpu_devices" (see list.h). I can re-parse that to an array or you can use the struct as-is.

> 
>>> BTW: having --device and --devices will disable -de:1 option. Is this ok for everybody?
>> Not sure what you mean. What will be disabled?
> 
> I saw some errors here. Don't mind.
> 
> $ ../run/john -fo:raw-sha256-opencl -t -de:1
> Unknown option: "-de:1"

This is what happens if you try to define two separate options "device" and "devices". It is simply not supported by this getopt. Instead, we will have one option called "devices" that can also be abbreviated as "device".

>> So you can just as well say --device=1,2 and --devices=3.
> 
> I was thinking that (after the change) you still can use, on bull (to get CPU):
> 
> john --platform:1 --device:1
> 
> OR
> john --devices:2

This could be supported, but to John's getopt both variants will use the same 'devices' option so we'd need to look if platform was used or not, to understand which syntax was used.

I'd say we just drop the --platform option and only support the new syntax. Otherwise it will get hairy when a user says --platform=2 --devices=all and things like that.

magnum

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.