mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 15:12:59 +02:00
In preparation for removal of VLAs due to skcipher requests on the stack
via SKCIPHER_REQUEST_ON_STACK() usage, this introduces the infrastructure
for the "sync skcipher" tfm, which is for handling the on-stack cases of
skcipher, which are always non-ASYNC and have a known limited request
size.
The crypto API additions:
struct crypto_sync_skcipher (wrapper for struct crypto_skcipher)
crypto_alloc_sync_skcipher()
crypto_free_sync_skcipher()
crypto_sync_skcipher_setkey()
crypto_sync_skcipher_get_flags()
crypto_sync_skcipher_set_flags()
crypto_sync_skcipher_clear_flags()
crypto_sync_skcipher_blocksize()
crypto_sync_skcipher_ivsize()
crypto_sync_skcipher_reqtfm()
skcipher_request_set_sync_tfm()
SYNC_SKCIPHER_REQUEST_ON_STACK() (with tfm type check)
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Bug: 150811495
Test: make
Change-Id: I5d002a7af64509a293cd4d685b97d2cd2c4d10e1
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| internal | ||
| acompress.h | ||
| aead.h | ||
| aes.h | ||
| akcipher.h | ||
| algapi.h | ||
| authenc.h | ||
| b128ops.h | ||
| blowfish.h | ||
| cast_common.h | ||
| cast5.h | ||
| cast6.h | ||
| cbc.h | ||
| chacha.h | ||
| cryptd.h | ||
| crypto_wq.h | ||
| ctr.h | ||
| des.h | ||
| dh.h | ||
| drbg.h | ||
| ecdh.h | ||
| engine.h | ||
| gcm.h | ||
| gf128mul.h | ||
| ghash.h | ||
| hash_info.h | ||
| hash.h | ||
| hmac.h | ||
| if_alg.h | ||
| kpp.h | ||
| mcryptd.h | ||
| md5.h | ||
| morus_common.h | ||
| morus640_glue.h | ||
| morus1280_glue.h | ||
| nhpoly1305.h | ||
| null.h | ||
| padlock.h | ||
| pcrypt.h | ||
| pkcs7.h | ||
| poly1305.h | ||
| public_key.h | ||
| rng.h | ||
| scatterwalk.h | ||
| serpent.h | ||
| sha.h | ||
| sha1_base.h | ||
| sha3.h | ||
| sha256_base.h | ||
| sha512_base.h | ||
| skcipher.h | ||
| sm3_base.h | ||
| sm3.h | ||
| sm4.h | ||
| twofish.h | ||
| xts.h | ||