> Well I executed this right after the 'where' from last time (still
> had it up in a window though the connection has long since timed
> out):
> 
> (gdb) disassemble
> Dump of assembler code for function vpaes_cbc_encrypt:
>    ...
>    0xb7e369f8 <+184>:  movdqu %xmm0,(%ebx,%esi,1)
> => 0xb7e369fd <+189>:         lea    0x10(%esi),%esi
>    0xb7e36a00 <+192>: sub    $0x10,%edi
>    0xb7e36a03 <+195>: jae    0xb7e369d0 <vpaes_cbc_encrypt+144>

Admittedly I could have relied on line information ('where' pointed at
vpaes-x86.s:647), but I wanted to be sure.

> End of assembler dump.
> (gdb) info reg
> ...
> edi            0xffffebb0      -5200

Bad value. 'edi' is initially loaded with length. See if attached patch
fixes the problem. In order to do that download 1.0.1 source from
openssl.org and unpack. Then in source directory

patch -p0 < /some/where/vpaes-x86.diff;
./config shared;
make;
env LD_LIBRARY_PATH=`pwd` ssh failinghost;

Index: crypto/aes/asm/vpaes-x86.pl
===================================================================
RCS file: /e/openssl/cvs/openssl/crypto/aes/asm/vpaes-x86.pl,v
retrieving revision 1.7
diff -u -w -r1.7 vpaes-x86.pl
--- crypto/aes/asm/vpaes-x86.pl 15 Dec 2011 22:20:04 -0000      1.7
+++ crypto/aes/asm/vpaes-x86.pl 31 Mar 2012 10:06:51 -0000
@@ -856,6 +856,7 @@
        &sub    ($round,16);
        &mov    (&DWP(4,"esp"),$key)            # save key
        &mov    (&DWP(8,"esp"),$const);         # save ivp
+       &jc     (&label("cbc_done"));
        &mov    ($out,$round);                  # $out works as $len
 
        &lea    
($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));

Reply via email to