Skip to content
Commit f044a84e authored by Dmitry Vyukov's avatar Dmitry Vyukov Committed by Herbert Xu
Browse files

crypto: don't optimize keccakf()



keccakf() is the only function in kernel that uses __optimize() macro.
__optimize() breaks frame pointer unwinder as optimized code uses RBP,
and amusingly this always lead to degraded performance as gcc does not
inline across different optimizations levels, so keccakf() wasn't inlined
into its callers and keccakf_round() wasn't inlined into keccakf().

Drop __optimize() to resolve both problems.

Signed-off-by: default avatarDmitry Vyukov <dvyukov@google.com>
Fixes: 83dee2ce ("crypto: sha3-generic - rewrite KECCAK transform to help the compiler optimize")
Reported-by: default avatar <syzbot+37035ccfa9a0a017ffcf@syzkaller.appspotmail.com>
Reported-by: default avatar <syzbot+e073e4740cfbb3ae200b@syzkaller.appspotmail.com>
Cc: linux-crypto@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 6e88f012
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment