[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-1bd03cf57a9b2e2294143f76c21f386a94e5e6c8@git.kernel.org>
Date: Tue, 23 Feb 2016 00:59:24 -0800
From: tip-bot for Josh Poimboeuf <tipbot@...or.com>@zytor.com
To: linux-tip-commits@...r.kernel.org@...or.com
Cc: chris.j.arges@...onical.com, namhyung@...il.com,
luto@...capital.net, mmarek@...e.cz, brgerst@...il.com,
torvalds@...ux-foundation.org, palves@...hat.com,
tglx@...utronix.de, jpoimboe@...hat.com, acme@...nel.org,
luto@...nel.org, hpa@...or.com, mingo@...nel.org,
dvlasenk@...hat.com, bernd@...rovitsch.priv.at, jslaby@...e.cz,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
peterz@...radead.org, bp@...en8.de
Subject: [tip:x86/debug] x86/asm/crypto: Don't use RBP as a scratch register
Commit-ID: 1bd03cf57a9b2e2294143f76c21f386a94e5e6c8
Gitweb: http://git.kernel.org/tip/1bd03cf57a9b2e2294143f76c21f386a94e5e6c8
Author: Josh Poimboeuf <jpoimboe@...hat.com>
AuthorDate: Thu, 21 Jan 2016 16:49:18 -0600
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 23 Feb 2016 09:03:57 +0100
x86/asm/crypto: Don't use RBP as a scratch register
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@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Bernd Petrovitsch <bernd@...rovitsch.priv.at>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Chris J Arges <chris.j.arges@...onical.com>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Jiri Slaby <jslaby@...e.cz>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Michal Marek <mmarek@...e.cz>
Cc: Namhyung Kim <namhyung@...il.com>
Cc: Pedro Alves <palves@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: live-patching@...r.kernel.org
Link: http://lkml.kernel.org/r/15a3eb7ebe68e37755927915f45e4f0bde4d18c5.1453405861.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
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 a5a14c6..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
Powered by blists - more mailing lists