crypto: x86/sha1-ssse3 - Fix RBP usage
authorJosh Poimboeuf <jpoimboe@redhat.com>
Mon, 18 Sep 2017 19:42:06 +0000 (14:42 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 20 Sep 2017 09:42:35 +0000 (17:42 +0800)
commit6488bce756861b94810e54f83416d5e74c0f18bf
treea2f9b51a97bb955c4cb91a7f85efafecb574c26d
parentd7b1722c72aa915283ada27709c6feeb392f6038
crypto: x86/sha1-ssse3 - Fix RBP usage

Using RBP as a temporary register breaks frame pointer convention and
breaks stack traces when unwinding from an interrupt in the crypto code.

Swap the usages of R12 and RBP.  Use R12 for the REG_D register, and use
RBP to store the pre-aligned stack pointer.

Reported-by: Eric Biggers <ebiggers@google.com>
Reported-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Eric Biggers <ebiggers@google.com>
Acked-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/sha1_ssse3_asm.S