[PATCH 14/33] x86/asm/crypto: Don't use rbp as a scratch register
From: Josh Poimboeuf
Date: Thu Jan 21 2016 - 18:00:36 EST
The frame pointer (rbp) is getting clobbered in
sha1_mb_mgr_submit_avx2() before a function call, which can mess up
stack traces. Use r12 instead.
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S b/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S
index a5a14c62..c3b9447 100644
--- a/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S
+++ b/arch/x86/crypto/sha-mb/sha1_mb_mgr_submit_avx2.S
@@ -86,8 +86,8 @@ job_rax = %rax
len = %rax
DWORD_len = %eax
-lane = %rbp
-tmp3 = %rbp
+lane = %r12
+tmp3 = %r12
tmp = %r9
DWORD_tmp = %r9d
@@ -99,7 +99,7 @@ lane_data = %r10
# arg 2 : rdx : job
ENTRY(sha1_mb_mgr_submit_avx2)
push %rbx
- push %rbp
+ push %r12
mov _unused_lanes(state), unused_lanes
mov unused_lanes, lane
@@ -190,7 +190,7 @@ len_is_0:
movl DWORD_tmp, _result_digest+1*16(job_rax)
return:
- pop %rbp
+ pop %r12
pop %rbx
ret
--
2.4.3