android_kernel_xiaomi_sm7250/crypto
Kees Cook 892b1f54ca UPSTREAM: crypto: skcipher - Introduce crypto_sync_skcipher
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 b350bee5ea0f4db75d4c6191a2e95db16f40c278)
Signed-off-by: Hridya Valsaraju <hridya@google.com>
2020-03-12 10:46:18 -07:00
..
asymmetric_keys crypto: asymmetric_keys - select CRYPTO_HASH where needed 2019-07-26 09:14:13 +02:00
async_tx
842.c
ablkcipher.c
acompress.c
adiantum.c UPSTREAM: crypto: adiantum - initialize crypto_spawn::inst 2019-01-18 12:36:04 -08:00
aead.c crypto: aead - set CRYPTO_TFM_NEED_KEY if ->setkey() fails 2019-03-23 20:09:54 +01:00
aegis128.c crypto: aegis - fix handling chunked inputs 2019-03-23 20:09:54 +01:00
aegis128l.c crypto: aegis - fix handling chunked inputs 2019-03-23 20:09:54 +01:00
aegis256.c crypto: aegis - fix handling chunked inputs 2019-03-23 20:09:54 +01:00
aegis.h
aes_generic.c
aes_ti.c crypto: aes_ti - disable interrupts while accessing S-box 2019-02-12 19:46:58 +01:00
af_alg.c crypto: af_alg - Use bh_lock_sock in sk_destruct 2020-02-01 09:37:11 +00:00
ahash.c crypto: hash - set CRYPTO_TFM_NEED_KEY if ->setkey() fails 2019-03-23 20:09:54 +01:00
akcipher.c
algapi.c crypto: api - Fix race condition in crypto_spawn_alg 2020-02-11 04:34:05 -08:00
algboss.c
algif_aead.c
algif_hash.c
algif_rng.c
algif_skcipher.c
ansi_cprng.c
anubis.c
api.c crypto: api - Fix race condition in crypto_spawn_alg 2020-02-11 04:34:05 -08:00
arc4.c
authenc.c crypto: authenc - fix parsing key with misaligned rta_len 2019-01-22 21:40:32 +01:00
authencesn.c crypto: authencesn - Avoid twice completion call in decrypt path 2019-01-22 21:40:31 +01:00
blkcipher.c
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c
ccm.c crypto: ccm - fix incompatibility between "ccm" and "ccm_base" 2019-05-22 07:37:43 +02:00
cfb.c crypto: cfb - remove bogus memcpy() with src == dest 2019-03-23 20:09:40 +01:00
chacha20poly1305.c This is the 4.19.61 stable release 2019-07-26 10:31:53 +02:00
chacha_generic.c
cipher.c
cmac.c
compress.c
crc32_generic.c
crc32c_generic.c
crct10dif_common.c
crct10dif_generic.c crypto: crct10dif-generic - fix use via crypto_shash_digest() 2019-05-22 07:37:37 +02:00
cryptd.c crypto: cryptd - Fix skcipher instance memory leak 2019-07-10 09:53:41 +02:00
crypto_engine.c
crypto_null.c
crypto_user.c crypto: user - fix memory leak in crypto_report 2019-12-13 08:52:48 +01:00
crypto_wq.c
ctr.c
cts.c
deflate.c
des_generic.c
dh_helper.c
dh.c
drbg.c
ecb.c
ecc_curve_defs.h
ecc.c crypto: ecdh - fix big endian bug in ECC library 2019-12-13 08:52:48 +01:00
ecc.h
ecdh_helper.c
ecdh.c
echainiv.c
fcrypt.c
fips.c
gcm.c crypto: gcm - fix incompatibility between "gcm" and "gcm_base" 2019-05-22 07:37:37 +02:00
gf128mul.c
ghash-generic.c crypto: ghash - fix unaligned memory access in ghash_setkey() 2019-07-26 09:14:19 +02:00
hash_info.c
hmac.c
internal.h crypto: api - Fix race condition in crypto_spawn_alg 2020-02-11 04:34:05 -08:00
jitterentropy-kcapi.c
jitterentropy.c
Kconfig This is the 4.19.21 stable release 2019-02-12 20:37:21 +01:00
keywrap.c
khazad.c
kpp.c
lrw.c
lz4.c
lz4hc.c
lzo.c
Makefile
mcryptd.c
md4.c
md5.c
memneq.c
michael_mic.c
morus640.c crypto: morus - fix handling chunked inputs 2019-03-23 20:09:54 +01:00
morus1280.c crypto: morus - fix handling chunked inputs 2019-03-23 20:09:54 +01:00
nhpoly1305.c UPSTREAM: crypto: adiantum - adjust some comments to match latest paper 2019-01-18 12:35:59 -08:00
pcbc.c crypto: pcbc - remove bogus memcpy()s with src == dest 2019-03-23 20:09:55 +01:00
pcrypt.c crypto: pcrypt - Do not clear MAY_SLEEP flag in original request 2020-02-11 04:34:05 -08:00
poly1305_generic.c
proc.c
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c
rsa_helper.c
rsa-pkcs1pad.c crypto: fix a memory leak in rsa-kcs1pad's encryption mode 2019-11-20 18:47:44 +01:00
rsa.c
rsaprivkey.asn1
rsapubkey.asn1
salsa20_generic.c crypto: salsa20 - don't access already-freed walk.iv 2019-05-22 07:37:36 +02:00
scatterwalk.c
scompress.c
seed.c
seqiv.c
serpent_generic.c crypto: serpent - mark __serpent_setkey_sbox noinline 2019-07-26 09:14:13 +02:00
sha1_generic.c
sha3_generic.c
sha256_generic.c
sha512_generic.c
shash.c crypto: hash - set CRYPTO_TFM_NEED_KEY if ->setkey() fails 2019-03-23 20:09:54 +01:00
simd.c
skcipher.c UPSTREAM: crypto: skcipher - Introduce crypto_sync_skcipher 2020-03-12 10:46:18 -07:00
sm3_generic.c crypto: sm3 - fix undefined shift by >= width of value 2019-01-22 21:40:31 +01:00
sm4_generic.c
tcrypt.c This is the 4.19.14 stable release 2019-01-09 18:55:03 +01:00
tcrypt.h
tea.c
testmgr.c This is the 4.19.87 stable release 2019-12-01 09:53:43 +01:00
testmgr.h This is the 4.19.37 stable release 2019-04-30 12:53:00 +02:00
tgr192.c crypto: tgr192 - fix unaligned memory access 2020-01-27 14:50:13 +01:00
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xor.c
xts.c
zstd.c