Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 20 Mar 2015 16:15:52 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: [GSoC] building JtR for MIC

On Fri, Mar 20, 2015 at 08:51:19PM +0800, Lei Zhang wrote:
> Without _GNU_SOURCE defined, some other compile errors will pop out, like this one:
> --------------------------------------------------------------------------------
> icc -mmic -DAC_BUILT -no-opt-prefetch -c -g -O2 -DARCH_LITTLE_ENDIAN=1     -fopenmp  -pthread  -I/home/zhanglei/mic/include  rar2john.c -o rar2john.o
> rar2john.c(198): error #140: too many arguments in function call
>  				if( (pos = memmem(buf, count, "\x52\x61\x72\x21\x1a\x07\x00", 7))) {
>  				                              ^
> 
> 
> rar2john.c(749): error #140: too many arguments in function call
>  				if( (pos = (char*)memmem(buf, count, "\x52\x61\x72\x21\x1a\x07\x01\x00", 8))) {
>  				                                     ^
> 
> 
> compilation aborted for rar2john.c (code 2)
> ---------------------------------------------------------------------------------
> Actually this reveals another bug in icc, as I reported before.

This isn't necessarily an icc bug.  It's possible that the #define trick
jumbo.h uses to define its custom memmem() clashes with the system's
headers for MIC even when they're not providing a memmem().  This is
weird, though.

> But I haven't investigated why defining _GNU_SOURCE eliminates this error.

Defining _GNU_SOURCE enables the system's memmem(), and thus disables
our custom one in jumbo.[ch].

> > We have our own bzero() as a macro in jumbo.h.  We should get rid of it,
> > and of all uses of bzero() in jumbo if there are any (I think not).
> 
> So I could remove all bzero-related code? That should be no problem.

Yes, please.  Should use memset() instead.

> > strcasecmp() in jumbo.c is obviously buggy (won't compile, so probably
> > never tested - we should fix and test it), and besides it shouldn't be
> > enabled for this build.  Please investigate what caused it to be enabled.
> 
> There's a bug in jumbo.h, line 209:
> ----------------------------
> #if !AC_BUILT
> ----------------------------
> Actually AC_BUILT is defined in command line by -DAC_BUILT, and it won't pass this test. We should use #ifndef instead.

OK, please fix it.

Alexander

Powered by blists - more mailing lists

Your e-mail address:

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