• Kees Cook's avatar
    crypto: skcipher - Introduce crypto_sync_skcipher · b350bee5
    Kees Cook authored
    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: default avatarKees Cook <keescook@chromium.org>
    Reviewed-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    b350bee5
skcipher.h 22.8 KB