2014-01-13 16:40:31 +00:00
|
|
|
commit 3847aa109e8ff3f2781d53315f81e8d29ee35892
|
|
|
|
Author: Tom Yu <tlyu@mit.edu>
|
|
|
|
Date: Fri Jan 10 15:04:32 2014 -0500
|
|
|
|
|
|
|
|
Avoid text relocations in iaesx86.s
|
|
|
|
|
|
|
|
Use PC-relative addressing to avoid runtime text relocations on i386.
|
|
|
|
|
|
|
|
Adapted patch from Nalin Dahyabhai.
|
|
|
|
|
|
|
|
ticket: 7815
|
|
|
|
target_version: 1.12.1
|
|
|
|
tags: pullup
|
|
|
|
|
|
|
|
diff --git a/src/lib/crypto/builtin/aes/iaesx86.s b/src/lib/crypto/builtin/aes/iaesx86.s
|
|
|
|
index 1aa12e6..33470dd 100644
|
|
|
|
--- a/src/lib/crypto/builtin/aes/iaesx86.s
|
|
|
|
+++ b/src/lib/crypto/builtin/aes/iaesx86.s
|
|
|
|
@@ -323,7 +323,10 @@ _iEncExpandKey128:
|
2014-01-06 23:53:03 +00:00
|
|
|
|
|
|
|
movdqu [edx], xmm1
|
|
|
|
|
|
|
|
- movdqa xmm5, [shuffle_mask]
|
2014-01-13 16:40:31 +00:00
|
|
|
+ call .next
|
|
|
|
+.next:
|
|
|
|
+ pop ecx
|
|
|
|
+ movdqa xmm5, [ecx-.next+shuffle_mask]
|
2014-01-06 23:53:03 +00:00
|
|
|
|
|
|
|
add edx,16
|
|
|
|
|
2014-01-13 16:40:31 +00:00
|
|
|
@@ -421,7 +424,10 @@ _iEncExpandKey256:
|
2014-01-06 23:53:03 +00:00
|
|
|
|
|
|
|
add edx,32
|
|
|
|
|
|
|
|
- movdqa xmm5, [shuffle_mask] ; this mask is used by key_expansion
|
2014-01-13 16:40:31 +00:00
|
|
|
+ call .next
|
|
|
|
+.next:
|
|
|
|
+ pop ecx
|
|
|
|
+ movdqa xmm5, [ecx-.next+shuffle_mask] ; this mask is used by key_expansion
|
2014-01-06 23:53:03 +00:00
|
|
|
|
|
|
|
aeskeygenassist xmm2, xmm3, 0x1 ;
|
|
|
|
call key_expansion256
|