Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 17 Feb 2011 04:08:28 +0300
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: OpenMP patch/DES SSE key setup patch

Tim,

On Thu, Dec 16, 2010 at 01:36:21PM -0600, Tim Yardley wrote:
> I decided to play around with the new DES/OpenMP patch on x86 (32bit)
> architectures with SSE2.  A simple CFLAGS change of adding -msse2 will
> get it to pass your compile checks.  After that though, the code fails
> to actually run correctly.
> 
> a john -test outputs the following:
> 
> Benchmarking: Traditional DES [128/128 BS SSE2]... FAILED (get_hash[0](0))
> Benchmarking: BSDI DES (x725) [128/128 BS SSE2]... FAILED (get_hash[0](0))

I've just tried this with gcc 4.5.0 (a custom build I made last year).
You're correct that -msse2 needs to be added.  I added it to OMPFLAGS:

OMPFLAGS = -fopenmp -msse2

Then john-1.7.6-omp-des-7 compiled and ran just fine, albeit a lot
slower than it does on the same machine with an x86-64 build, as
expected.  I am getting something like 6.5M c/s for 32-bit build vs.
10M c/s for 64-bit with 8 threads on the same Core i7 machine
(quad-core with HT).  This is for DES-based crypt(3).  For LM hashes,
the difference is smaller: either does over 40M c/s, which is unoptimal
in either case (you're better off using john-1.7.6-fast-des-key-setup-3
instead, without OpenMP but maybe with multiple instances).

john-1.7.6-omp-des-4 also builds and works "fine", but shows no speedup
from the use of multiple threads at all.  There must be some data layout
issue only affecting 32-bit builds, since this same patch works well and
sometimes outperforms -omp-des-7 on x86-64 (which is why I keep both
patches on the wiki).

In short, I am unable to reproduce the problem.  WORKSFORME.  But I did
not specifically try "your" version of gcc, etc.  What we do know from
this reliably is that these patches are not "fundamentally" x86-64 only.
(But you do need x86-64 for decent performance anyway.)

...Oh, here's a guess: maybe you forgot to "make clean" after making
some change, such as a Makefile edit?  An inconsistent build can fail
like you describe, of course.

Alexander

Powered by blists - more mailing lists

Your e-mail address:

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