[krb5] Save/restore ebx in functions where we modify it

Nalin Dahyabhai nalin at fedoraproject.org
Thu Jan 9 16:03:09 UTC 2014


commit 8a1df153c6a0d15f825b92bf973fd0d709af23d0
Author: Nalin Dahyabhai <nalin at dahyabhai.net>
Date:   Thu Jan 9 11:02:26 2014 -0500

    Save/restore ebx in functions where we modify it
    
    - amend the PIC patch for iaesx86.s to also save/restore ebx in the
      functions where we modify it

 krb5-1.12-pic-aes-ni.patch |   36 ++++++++++++++++++++++++++++++++++--
 krb5.spec                  |    4 ++++
 2 files changed, 38 insertions(+), 2 deletions(-)
---
diff --git a/krb5-1.12-pic-aes-ni.patch b/krb5-1.12-pic-aes-ni.patch
index 61c6c82..2000fbe 100644
--- a/krb5-1.12-pic-aes-ni.patch
+++ b/krb5-1.12-pic-aes-ni.patch
@@ -8,7 +8,13 @@
  
  align 16
  key_expansion256:
-@@ -318,7 +319,12 @@ _iEncExpandKey128:
+@@ -318,12 +319,18 @@ _iEncExpandKey128:
+ 
+ 	mov ecx,[esp-4+8]		;input
+ 	mov edx,[esp-4+12]		;ctx
++	push ebx
+ 
+         movdqu xmm1, [ecx]    ; loading the key
  
          movdqu [edx], xmm1
  
@@ -22,7 +28,24 @@
  
          add edx,16
  
-@@ -421,7 +430,12 @@ _iEncExpandKey256:
+@@ -348,6 +355,8 @@ _iEncExpandKey128:
+         aeskeygenassist xmm2, xmm1, 0x36    ; Generating round key 10
+         call key_expansion128
+ 
++	pop ebx
++
+ 	ret
+ 
+ 
+@@ -412,6 +421,7 @@ global _iEncExpandKey256
+ _iEncExpandKey256:
+ 	mov ecx, [esp-4+8]		;input
+ 	mov edx, [esp-4+12]		;expanded key
++	push ebx
+ 
+ 
+     movdqu xmm1, [ecx]    ; loading the key
+@@ -421,7 +431,12 @@ _iEncExpandKey256:
  
      add edx,32
  
@@ -36,3 +59,12 @@
  
      aeskeygenassist xmm2, xmm3, 0x1     ;
      call key_expansion256
+@@ -452,6 +467,8 @@ _iEncExpandKey256:
+     movdqu [edx], xmm1
+ 
+ 
++	pop ebx
++
+ 	ret
+ 
+ 
diff --git a/krb5.spec b/krb5.spec
index e53dc96..1ace267 100644
--- a/krb5.spec
+++ b/krb5.spec
@@ -978,6 +978,10 @@ exit 0
 %{_sbindir}/uuserver
 
 %changelog
+* Thu Jan  9 2014 Nalin Dahyabhai <nalin at redhat.com>
+- amend the PIC patch for iaesx86.s to also save/restore ebx in the
+  functions where we modify it
+
 * Mon Jan  6 2014 Nalin Dahyabhai <nalin at redhat.com> - 1.12-9
 - grab a more-commented version of the most recent patch from upstream
   master


More information about the scm-commits mailing list