Cell SDK on PS3 with Yellow dog linux 5.0
People tend to think that gone are the days when the “RPM Hell” used to exist. We have yum, aptitude and what not! If you install linux on a PS3, I’d like to bring you back to reality, especially like me when you have yellowdog 5.0 installed on a first gen PS3.
What is interesting is that all these package managers rely on repositories in /etc/yum.repos.d/*.
If you do not have the good repositories then you can kiss goodbye to installing the Cell Broadband Engine SDK provided by IBM. This SDK has the spu-gcc, spu-g++ which is the right set of compilers if you want to use the 1 master processor (Power Processor Element – PPE) and the other six SPE (Synergistic Processor Elements – SPEs) …think of these as slaves. You might wonder where’s the 7th of the cell processor, well, you cannot access it because it is used internally by the PS3 for virtualization.
So I got a yellow dog 5.0 iso image from here. I followed the instructions for installing it from here. I did this almost a year ago! Yes…I did actually keep it dead for a while! Then I installed gcc and compiled John the ripper! To my utter disappointment, there was no performance benefit!
Then Marc Bevand told me at Toorcon X that I needed spu-gcc to compile JTR on PS3 to get the benefits. So I got the cell sdk ISO from here. I then mounted the ISO.
mount -o loop cellsdk11.iso /mnt/disk
cd /mnt/disk
cd software
./cellsdk install
I got bunch of errors. It wanted me to install freeglut-devel and tk-8.4.*.
Thus began my journey of 10,000 steps to get the dependencies resolved and I burnt my fingers, keyboard, brains, etc….and although I realized that everyone in the US and the world had found hope…things were not looking bright for me! Until I bumped into this fantastic repository here. Trust me it took me about 8 hours of incessant installing and compiling (almost 120 odd different files) and scores of google searches to land me into this. I installed the glut, libx11, tk, tcl, libtcl, glut-devel, libstdc++, libstdc-so7, and many other packages that I cannot even recall now to get the cellsdk to work! And even though I did, I still couldnt get ./cellsdk install to work! After about 8 hours of effort and being so close to success just seemed evil. Then I realized that all the packages needed were related to the PPC64 simulator (libx11.ppc64, libtcl.ppc.64, etc.)…a quick look into the readme told me that I could neglect that using the –nosim directive to make it work.
Finally,
./cellsdk install –nosim
worked!!!!!
A small step for mankind but a giant step for me!
Hello Rajat, nice blog and article.
I use Fedora10 on my PS3, i have also CELL-SDK on it.
I install John the ripper on it but it compiled with gcc, and use the normal CPU.
you said i have to compile it with spu-gcc, do i just need to modify john the ripper “src/Makefile” and change those parameters to spu-gcc??
“
CPP = gcc
CC = gcc
AS = gcc
LD = gcc
“
or there is additional setting i have to do.
thanks,
Dr.Death
Was this answer helpful?
LikeDislikeNo, actually more research lead me to the fact that this is not just as simple as replacing gcc with spu-gcc in the Makefile. I tried it and I got errors related to some modem communication header file or something. I searched a week to resolve it but to no avail. For now, I guess, you can compile it with just gcc because there’s no real support in JtR for SPEs of PS3. This is because the support for use of SPEs (the cell processors additional processors) is provided with the use of the CellBE API. This API has not been used in the JtR code.
Was this answer helpful?
LikeDislikeHello Rajat, I already use JTR on my PS3 box, but its run on the cpu as a normal x86 machine.
I test DES cracker that run on SPU, its try 11 million key/SEC. not very fast comparing with crackers run on GPU. (test one good GPU md5 cracker with my nVidia 9800GT it does 400 Million key/sec).
there is a guy post in his blog that he reach 31 Billion key/sec!! with SPU.
http://yopen.net/?p=13
if he can share with the developers his code will be great.
Regards,
Dr.Death
That’s right. The author of the post you linked says, “So I decided to code an MD5 function that would run on the processor and just see how fast I could get it going and of course, share the load between the SPUs.”.
This code modification is definitely required if you wish to harness the brute power of the SPUs.
Some people have already tried porting the code to PS3 (e.g.,http://chamewco.livejournal.com/97509.html) but the efforts haven’t resulted in a full-blown parallelized JtR yet.
I know you can compile JtR with the ppc64 setting (but the performance will be just the same as a G5 processor). To harness the power of SPEs some edits are definitely required unless someone writes an automatic porter to CellBE. I don’t know if such portability converter or automatic CellBE converter exists in the public domain.
I wish people share the research they do in this area because at this point it’s very nascent.
Was this answer helpful?
LikeDislikefound the code that the guy from yopen modified.. and thougt that i might as well post the links here to save others from having to dig them up 🙂
http://www.security-assessment.com/files/presentations/md5-spu-0.1.tar.gz
http://www.security-assessment.com/files/presentations/crackstation-njb-bheu08-v2.pdf
Was this answer helpful?
LikeDislike