Date: Mon, 25 May 2015 22:19:17 -0700 From: <writeonce@...ipix.org> To: john-dev@...ts.openwall.com, "Rich Felker" <dalias@...c.org> Subject: RE: update: JtR for Windows using musl libc On 05/25/2015 11:20 PM, Solar Designer wrote:> On Mon, May 25, 2015 at 11:01:47PM -0400, Rich Felker wrote: >> The argument registers for integer arguments are completely different >> (rcx,rdx,r8,r9 vs rdi,rsi,rdx,rcx,r8,r9) so I would expect the >> behavior to be nonsense. > > Oh, this must be it. rdi for the argument was my first thought, but I > wrongly recalled that all of these functions use it. I just took a > look, and the asm version of DES_bs_crypt_25 does not actually use its > argument (even though it's called with one, since the C implementation > sometimes uses it). So this is why descrypt and tripcode passed test. > >> Note that there's a GCC attribute, __sysv_abi__, that could be used to >> call the standard ABI asm code from a caller that's using the MS ABI. >> That would be a way to reuse the asm unmodified rather than having to >> wrap it or write a special version for Windows. The attribute just >> needs to be put on the declarations of the asm functions in the >> translation units they're called from. > > midipix may try that. > > Alexander > > I have now looked at x86-64.h and DES_bs.h and have added a few sysv_abi hints which did not change the outcome. My understanding is that someone familiar with JtR would have an easier time debugging this. As for performance: at some point I commented out the code in times(2) which converts NT measures (units of 100ns) to clock_t (1/100 sec)... the test was run natively on i3-2100 pc, and with the fixed __sys_times the numbers now finally seem correct. As an aside, an additional factor that might slow things down a bit (but nothing like *100000) is that the entire stack (libc, runtime library, john) is built with -g3 -O0. midipix View attachment "john.output" of type "text/x-c++" (1029 bytes) View attachment "john.strace" of type "text/plain" (10479 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.