Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+TsHUA8TMAK7=6yArwSYBQ2+EL-HByh7tib-gYpBy8FsRemEg@mail.gmail.com>
Date: Wed, 15 May 2013 11:35:03 +0530
From: Sayantan Datta <std2048@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: des-opencl salt binaries

Hi,

On Tue, May 14, 2013 at 10:01 PM, Lukas Odzioba <lukas.odzioba@...il.com>wrote:

> Could you please upload this script to wiki? It will help others.


I couldn't find a proper place to upload them. So I'll just upload it
here.  The binaries are assumed to be named as DES_bs_kernel[0-4095].bin.


I am having trouble to imagine how this data is organized. Could you
> post some samples for 2 different kernels?
>

The second .text section of inner elf contains both the ISA instructions
and ISA data.

kernel 0:
starting instruction in .isa text generated by save-temps.
s_load_dwordx4  s[16:19], s[0:1], 0x04                    // 00000000:
C0880104

last instruction
 v_and_b32     v27, 0x04040404, v39                        // 00001048:
36364EFF 04040404

codeLenInByte        = 60668;Bytes

kernel 2:
starting instruction in .isa text generated by save-temps.
s_load_dwordx4  s[16:19], s[0:1], 0x04                    // 00000000:
C0880104

last instruction
 v_and_b32     v27, 0x04040404, v39                        // 00001048:
36364EFF 04040404

codeLenInByte        = 60696;Bytes


As I have mentioned all the instructions are same for all 4096 kernels. We
can find the bytecode location for last instruction by searching the first
instruction and adding 4168(0x1048). I have verified that the last
instruction is indeed 36364EFF for all kernels. After the last instruction
the data section will start. So the size of the remaing data section =
codeLenInByte - 4168.

  The question is, can fix something that compiler screwed to make
> patching possible?


Patching without the need to change data section seems possible. For
example reorganizing the instructions or replacing instructions with new
one should be possible. But wring our own kernel in GCN ISA seems to be
little distant. I don't know how Realhet(author of GCN ISA assembler)
manged to generate the data section given that there are no documentation
regarding the data section!!

Regards,
Sayantan

Content of type "text/html" skipped

Download attachment "Script -NULL inner IL.tar.gz" of type "application/x-gzip" (6965 bytes)

Download attachment "Compare and NULL ISA  data.tar.gz" of type "application/x-gzip" (6221 bytes)

Download attachment "NULL ISA instructions.tar.gz" of type "application/x-gzip" (7859 bytes)

Powered by blists - more mailing lists

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