]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: sa2ul - Reduce stack usage
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 15 Oct 2020 03:31:53 +0000 (14:31 +1100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Oct 2020 06:35:02 +0000 (17:35 +1100)
commit14339eade1c25f107a3e61b046e947526a2604bd
tree6bba4dce1f672cf6d96a9d6f2194045a0b84dad1
parent52cd25f72ce4c1f320142583ee4fb1bde48a9666
crypto: sa2ul - Reduce stack usage

This patch reduces the stack usage in sa2ul:

1. Move the exported sha state into sa_prepare_iopads so that it
can occupy the same space as the k_pad buffer.

2. Use one buffer for ipad/opad in sa_prepare_iopads.

3. Remove ipad/opad buffer from sa_set_sc_auth.

4. Use async skcipher fallback and remove on-stack request from
sa_cipher_run.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: a62675cbfd4e ("crypto: sa2ul - Add AEAD algorithm support")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sa2ul.c
drivers/crypto/sa2ul.h