Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 26 Apr 2013 17:00:43 +0200
From: Dániel Bali <balijanosdaniel@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: GPU support under Windows

Hello!

Thanks for the tip, I managed to get it working with sse2. Here is the
makefile:

win32-cygwin-x86-opencl:
$(CP) x86-sse.h arch.h
@echo "#define JOHN_BLD" '"'$@... > john_build_rule.h
$(MAKE) $(PROJ_WIN32) \
JOHN_OBJS="$(JOHN_OBJS) $(OCL_OBJS) x86.o x86-sse.o sha1-mmx.o md4-mmx.o
md5-mmx.o sse-intrinsics.o" \
CFLAGS="$(CFLAGS) -I'$(OCLROOT)/include' -DHAVE_OPENCL
-mpreferred-stack-boundary=4 -msse2 -m32" \
ASFLAGS="$(ASFLAGS) -msse2 -m32 -DUNDERSCORES" \
LDFLAGS="$(LDFLAGS) -L'$(OCLROOT)/lib/x86' -lOpenCL "
$(MKDIR) ../run/kernels/
$(CP_PRESERVE) opencl/*.cl ../run/kernels/
$(CP_PRESERVE) opencl_*.h ../run/kernels/
@echo "Failing after this point just means some helper tools did not build:"
$(MAKE) $(PROJ_CXX) CFLAGS="$(CFLAGS) -m32"
# $(MAKE) $(PROJ_PCAP) CFLAGS="$(CFLAGS) -m32" TODO
@echo "All done"

I commented out the second helper tool because I was unsure what to install
for cygwin, but I will address that issue later.
I tested this and john successfully found my OpenCL devices, then I cracked
an md5 hash usingthe  raw-md5-opencl format.

How should I procceed? I guess this is far from being done.

Thanks,
Daniel

2013/4/26 Solar Designer <solar@...nwall.com>

> On Fri, Apr 26, 2013 at 01:41:30AM +0200, D?niel Bali wrote:
> > Using -lOpenCL helped. Then I tested if my cygwin is capable of compiling
> > the AMD sample programs and fortunately it is.
>
> Have you also tested that the existing non-GPU win32-cygwin-x86-sse2
> make target works for you?  If not yet, please test it.  If it fails for
> you, then please debug that before approaching the GPU task.
>
> > $(CP) x86-any.h arch.h
>
> x86-any is for ancient CPUs (prior to year 2000, really).  While it
> shouldn't necessarily cause any problems (other than poor speed with
> many of the JtR formats), you should be basing your GPU target on
> win32-cygwin-x86-sse2 instead.  Similarly, -mpreferred-stack-boundary=2
> would be wrong (it assumes non-use of MMX, etc., which is only
> reasonable in the -x86-any target for ancient CPUs).
>
> > The error I get is:
> >  opencl_wpapsk_fmt.o:opencl_wpapsk_fmt.c:(.text+0x20ad): undefined
> > reference to `_alter_endianity'
> >
> > So alter_endianity isn't defined. After looking at memory.h I found that
> > one of these flags are needed: MMX_COEF, NT_X86_64, MD5_SSE_PARA,
> > MD4_SSE_PARA.
>
> Quite possibly we did not test bleeding-jumbo with -x86-any targets
> lately.  We should do so before we make a release based on this branch.
>
> For your work, just base your new make target on -x86-sse2 and this
> problem should be gone.
>
> > I believe enabling GPU support for Windows is a process that is going to
> > involve a lot of error tracking and I really don't want to bother you
> with
> > every step,
>
> Please feel free to post about your progress often.  You just may not
> expect the rest of us to comment each time. ;-)
>
> > so I would like to know if there is a part of the documentation
> > (or any resource) that would be of interest to me.
>
> I'm afraid not.
>
> Alexander
>

[ CONTENT OF TYPE text/html SKIPPED ]

Powered by blists - more mailing lists

Your e-mail address:

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