crypto: x86/sha256-avx2 - Fix RBP usage
commitd3dfbfe2e6e7ecd620531d5201314ad14c4ed5b3
authorJosh Poimboeuf <jpoimboe@redhat.com>
Mon, 18 Sep 2017 19:42:08 +0000 (18 14:42 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 20 Sep 2017 09:42:36 +0000 (20 17:42 +0800)
tree3ca1e7bf788cdc1a2c3f3b5e58e0cf7f4d99e1e2
parent673ac6fbc74f835e2125df9ee39e8a2a423832e2
crypto: x86/sha256-avx2 - 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.

There's no need to use RBP as a temporary register for the TBL value,
because it always stores the same value: the address of the K256 table.
Instead just reference the address of K256 directly.

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/sha256-avx2-asm.S