Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 30 Apr 2013 19:26:26 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: --fork

On Tue, Apr 30, 2013 at 04:41:45PM +0200, magnum wrote:
> Speaking of that, I have plenty of these in bleeding:
> 
> +#if HAVE_MPI
> +	if (mpi_id == 1)
> +#endif
> 	printf("Something (often with unchanged indentation)");
> 
> In contest, I had a global variable 'options.rootnode' that was used instead, not ifdef'ed MPI but also valid for node/fork.
> 
> -#if HAVE_MPI
> -	if (mpi_id == 1)
> -#endif
> +	if (options.root_node)
> 	printf("Something...

Yes.  It's now called john_main_process, defined in john.h.  I had
committed this shortly before you wrote the message quoted above. ;-)

> Will you do something like that in code? If so, I'll just drop my MPI stuff.

It may be slightly more complicated because (I think) MPI needs more
messages muted than --fork does.  --fork creates new processes after the
hashes have been loaded, so the only error messages are from cracking
modes and such.  With MPI, they're also from the loader, from c3_fmt.c's
valid(), etc.  Well, john_main_process is set to 1 before we reach
john_fork(), so perhaps you can just check it in the loader, etc. - this
will be a no-op for --fork, but will do what's desired for MPI.

BTW, we should only mute messages that we're almost certain will be the
same for all processes.  In jumbo, you're also muting e.g. the
"Invalid rule ..." message in rules.c, which I think is wrong, because
this error might not be seen by the main process (MPI root node).  There
might be more instances of this problem.

Alexander

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.