Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 31 Jan 2012 22:16:23 +0100
From: magnum <john.magnum@...hmail.com>
To: Tevesz András <andras.tevesz@...il.com>
CC: john-dev@...ts.openwall.com
Subject: Re: OpenCL support on OSX [was: john-users]

On 01/31/2012 08:47 PM, Tevesz András wrote:
> 
> On 2012.01.31., at 20:23, magnum wrote:
> 
>> (Moved to dev list and cc András in case you're not a subscriber)
>>
>> On 01/31/2012 12:26 PM, Tevesz András wrote:
>>> I have some osx specific fixes to the john-1.7.9-jumbo-5-opencl-5.diff 
>> ...
>>> +macosx-x86-64-opencl:
>>> +	$(LN) x86-64.h arch.h
>>> +	@echo "#define JOHN_BLD" '"'$@... > john_build_rule.h
>>> +	$(MAKE) $(PROJ) \
>>> +		JOHN_OBJS="$(JOHN_OBJS) $(OCL_OBJS) c3_fmt.o x86-64.o sse-intrinsics.o" \
>>> +		ASFLAGS="$(ASFLAGS) -m64 -DUNDERSCORES -DBSD -DALIGN_LOG" \
>>> +		CFLAGS="$(CFLAGS) -m64  -I$(NVIDIA_CUDA)/include -I$(ATISTREAMSDKROOT)/include  -DBSD -DCL_VERSION_1_0" \
>>> +		LDFLAGS="$(LDFLAGS) -m64 -L$(ATISTREAMSDKROOT)/lib/x86_64 -L$(NVIDIA_CUDA)/lib64 -framework OpenCL"
>>> +	/bin/sh ./setup-opencl-stuff.sh
>>> +
>>
>>
>>> diff -ur b/john-1.7.9-jumbo-5/src/c3_fmt.c a/john-1.7.9-jumbo-5/src/c3_fmt.c
>>> --- john-1.7.9-jumbo-5-opencl-5/src/c3_fmt.c	2011-12-15 22:38:19.000000000 +0100
>>> +++ john-1.7.9-jumbo-5-opencl-5-macosx/src/c3_fmt.c	2012-01-31 11:59:54.000000000 +0100
>>> @@ -193,7 +193,10 @@
>>> 		return 1;
>>> 	}
>>>
>>> -	if (id != 10 && !ldr_in_pot)
>>> +	if (id != 10)
>>> +#ifdef HAVE_CRYPT
>>> +	if (!ldr_in_pot)
>>> +#endif
>>> #ifdef HAVE_MPI
>>> 	if (mpi_id == 0)
>>> #endif
>>
>>
>> I may be wrong but I think c3_fmt.o should be removed from the make
>> target instead of this change in c3_fmt.c. Can you use --format:crypt at
>> all with this build?

I was polite like a butler there. I am not wrong :)

> No it cant be used. 
> "./john --format=crypt --test
> Unknown ciphertext format name requested”
> The modification in the c3_fmt.c was only made to be able to compile the code. 
> The original code was also compiled with this modul. 
> But I think that -DHAVE_CRYPT is only enabled on linux platform.
> In the loader.c:38 ldr_in_pot is also in ifdef HAVE_CRYPT and the loader.c is also not used on non linux platfroms then again its compiled.
> As I see the moduls must be compiled but they are disabled with ifdef-s.

You got some details backwards. Anyway, I will omit c3_fmt.o from your
new target and skip the c3_fmt.c patch (it's a no-op) and commit the
rest of your patch to the git repos.

I'm not sure why we don't just include c3_fmt.o in the main object list
and wrap that whole source file in #ifdef HAVE_CRYPT. Solar?

Thanks,

magnum

Powered by blists - more mailing lists

Your e-mail address:

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