kernel-ark/crypto
Stephan Mueller e870456d8e crypto: algif_skcipher - overhaul memory management
The updated memory management is described in the top part of the code.
As one benefit of the changed memory management, the AIO and synchronous
operation is now implemented in one common function. The AF_ALG
operation uses the async kernel crypto API interface for each cipher
operation. Thus, the only difference between the AIO and sync operation
types visible from user space is:

1. the callback function to be invoked when the asynchronous operation
   is completed

2. whether to wait for the completion of the kernel crypto API operation
   or not

In addition, the code structure is adjusted to match the structure of
algif_aead for easier code assessment.

The user space interface changed slightly as follows: the old AIO
operation returned zero upon success and < 0 in case of an error to user
space. As all other AF_ALG interfaces (including the sync skcipher
interface) returned the number of processed bytes upon success and < 0
in case of an error, the new skcipher interface (regardless of AIO or
sync) returns the number of processed bytes in case of success.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-07-28 17:54:30 +08:00
..
asymmetric_keys crypto : asymmetric_keys : verify_pefile:zero memory content before freeing 2017-06-09 13:29:50 +10:00
async_tx async_tx: Fix DMA_PREP_FENCE usage in do_async_gen_syndrome() 2017-05-16 10:01:57 +05:30
.gitignore
842.c crypto: acomp - add support for 842 via scomp 2016-10-25 11:08:33 +08:00
ablk_helper.c crypto: ablk_helper - Fix cryptd reordering 2016-06-23 18:29:53 +08:00
ablkcipher.c crypto: Replaced gcc specific attributes with macros from compiler.h 2017-01-13 00:24:39 +08:00
acompress.c crypto: acomp - allow registration of multiple acomps 2017-04-21 20:30:50 +08:00
aead.c crypto: Replaced gcc specific attributes with macros from compiler.h 2017-01-13 00:24:39 +08:00
aes_generic.c crypto: aes-generic - drop alignment requirement 2017-02-11 17:50:43 +08:00
aes_ti.c crypto: aes_ti - fix comment for MixColumns step 2017-06-19 14:11:53 +08:00
af_alg.c Networking 2017-07-12 18:38:06 +08:00
ahash.c crypto: ahash - Fix EINPROGRESS notification callback 2017-04-10 19:09:18 +08:00
akcipher.c crypto: Replaced gcc specific attributes with macros from compiler.h 2017-01-13 00:24:39 +08:00
algapi.c crypto: algapi - Use pr_err common logging style. 2017-06-19 14:11:58 +08:00
algboss.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
algif_aead.c net: convert sock.sk_refcnt from atomic_t to refcount_t 2017-07-01 07:39:08 -07:00
algif_hash.c net: Work around lockdep limitation in sockets that use sockets 2017-03-09 18:23:27 -08:00
algif_rng.c
algif_skcipher.c crypto: algif_skcipher - overhaul memory management 2017-07-28 17:54:30 +08:00
ansi_cprng.c
anubis.c
api.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
arc4.c
authenc.c crypto: skcipher - Get rid of crypto_spawn_skcipher2() 2016-11-01 08:37:17 +08:00
authencesn.c crypto: authencesn - Fix digest_null crash 2017-07-18 17:01:11 +08:00
blkcipher.c crypto: Replaced gcc specific attributes with macros from compiler.h 2017-01-13 00:24:39 +08:00
blowfish_common.c
blowfish_generic.c
camellia_generic.c
cast5_generic.c
cast6_generic.c
cast_common.c
cbc.c crypto: cbc - Propagate NEED_FALLBACK bit 2017-03-09 18:34:39 +08:00
ccm.c crypto: ccm - move cbcmac input off the stack 2017-02-28 17:29:17 +08:00
chacha20_generic.c crypto: chacha20 - convert generic and x86 versions to skcipher 2016-12-27 17:47:31 +08:00
chacha20poly1305.c crypto: skcipher - Get rid of crypto_spawn_skcipher2() 2016-11-01 08:37:17 +08:00
cipher.c crypto: api - Remove no-op exit_ops code 2016-10-21 11:03:42 +08:00
cmac.c crypto: algapi - make crypto_xor() and crypto_inc() alignment agnostic 2017-02-11 17:52:28 +08:00
compress.c crypto: api - Remove no-op exit_ops code 2016-10-21 11:03:42 +08:00
crc32_generic.c
crc32c_generic.c
crct10dif_common.c
crct10dif_generic.c crypto: squash lines for simple wrapper functions 2016-09-13 20:27:26 +08:00
cryptd.c crypto: cryptd - Add support for skcipher 2016-11-28 21:23:18 +08:00
crypto_engine.c crypto: engine - replace pr_xxx by dev_xxx 2017-06-19 14:19:54 +08:00
crypto_null.c crypto: null - Remove default null blkcipher 2016-07-18 17:35:44 +08:00
crypto_user.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00
crypto_wq.c
ctr.c crypto: ctr - Propagate NEED_FALLBACK bit 2017-03-09 18:34:39 +08:00
cts.c crypto: algapi - make crypto_xor() and crypto_inc() alignment agnostic 2017-02-11 17:52:28 +08:00
deflate.c crypto: scomp - add support for deflate rfc1950 (zlib) 2017-04-24 18:11:08 +08:00
des_generic.c
dh_helper.c crypto: kpp, (ec)dh - fix typos 2017-06-10 12:04:25 +08:00
dh.c crypto: dh - comply with crypto_kpp_maxsize() 2017-06-10 12:04:27 +08:00
drbg.c crypto: drbg - Fixes panic in wait_for_completion call 2017-06-22 16:47:21 +08:00
ecb.c
ecc_curve_defs.h crypto: ecdh - Add ECDH software support 2016-06-23 18:29:57 +08:00
ecc.c crypto: ecdh - add privkey generation support 2017-06-10 12:04:35 +08:00
ecc.h crypto: ecdh - add privkey generation support 2017-06-10 12:04:35 +08:00
ecdh_helper.c crypto: kpp, (ec)dh - fix typos 2017-06-10 12:04:25 +08:00
ecdh.c crypto: ecdh - add privkey generation support 2017-06-10 12:04:35 +08:00
echainiv.c crypto: echainiv - Replace chaining with multiplication 2016-09-13 18:44:57 +08:00
fcrypt.c
fips.c
gcm.c crypto: gcm - wait for crypto op not signal safe 2017-05-23 12:45:11 +08:00
gf128mul.c crypto: gf128mul - define gf128mul_x_* in gf128mul.h 2017-04-05 21:58:35 +08:00
ghash-generic.c crypto: ghash-generic - move common definitions to a new header file 2016-10-02 22:26:40 +08:00
hash_info.c
hmac.c crypto: hmac - add hmac IPAD/OPAD constant 2017-05-23 12:52:05 +08:00
internal.h crypto: api - Remove no-op exit_ops code 2016-10-21 11:03:42 +08:00
jitterentropy-kcapi.c crypto: jitterentropy - drop duplicate header module.h 2016-11-17 23:34:52 +08:00
jitterentropy.c
Kconfig crypto: ecdh - add privkey generation support 2017-06-10 12:04:35 +08:00
keywrap.c
khazad.c
kpp.c crypto: Replaced gcc specific attributes with macros from compiler.h 2017-01-13 00:24:39 +08:00
lrw.c crypto: lrw - Fix use-after-free on EINPROGRESS 2017-04-10 19:09:17 +08:00
lz4.c crypto: lz4 - fixed decompress function to return error code 2017-04-10 19:17:27 +08:00
lz4hc.c crypto: lz4 - fixed decompress function to return error code 2017-04-10 19:17:27 +08:00
lzo.c treewide: use kv[mz]alloc* rather than opencoded variants 2017-05-08 17:15:13 -07:00
Makefile crypto: ecdh - add privkey generation support 2017-06-10 12:04:35 +08:00
mcryptd.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/stat.h> 2017-03-02 08:42:34 +01:00
md4.c
md5.c md5: remove from lib and only live in crypto 2017-03-24 22:02:56 +08:00
memneq.c
michael_mic.c
pcbc.c crypto: algapi - make crypto_xor() and crypto_inc() alignment agnostic 2017-02-11 17:52:28 +08:00
pcrypt.c
poly1305_generic.c crypto: poly1305 - Use unaligned access where required 2016-11-13 17:45:03 +08:00
proc.c
ripemd.h
rmd128.c
rmd160.c
rmd256.c
rmd320.c
rng.c crypto: rng - Remove unused function __crypto_rng_cast() 2017-06-10 12:04:11 +08:00
rsa_helper.c crypto: rsa - allow keys >= 2048 bits in FIPS mode 2016-08-24 21:07:10 +08:00
rsa-pkcs1pad.c crypto: rsa-pkcs1pad - use constant time memory comparison for MACs 2017-06-20 11:21:19 +08:00
rsa.c crypto: rsa - comply with crypto_akcipher_maxsize() 2017-06-10 12:04:30 +08:00
rsaprivkey.asn1 crypto: rsa - Store rest of the private key components 2016-07-05 23:05:26 +08:00
rsapubkey.asn1
salsa20_generic.c
scatterwalk.c crypto: scatterwalk - Remove unnecessary aliasing check in map_and_copy 2016-11-22 15:02:25 +08:00
scompress.c crypto: scomp - allow registration of multiple scomps 2017-04-24 18:11:07 +08:00
seed.c
seqiv.c crypto: algapi - make crypto_xor() and crypto_inc() alignment agnostic 2017-02-11 17:52:28 +08:00
serpent_generic.c
sha1_generic.c
sha3_generic.c crypto: sha3 - Add missing ULL suffixes for 64-bit constants 2016-08-08 23:43:46 +08:00
sha256_generic.c
sha512_generic.c
shash.c crypto: Replaced gcc specific attributes with macros from compiler.h 2017-01-13 00:24:39 +08:00
simd.c crypto: simd - Add simd skcipher helper 2016-11-28 21:23:18 +08:00
skcipher.c crypto: skcipher - Add missing API setkey checks 2017-05-18 13:04:05 +08:00
tcrypt.c crypto: tcrypt - don't disable irqs and wait 2017-05-18 13:19:48 +08:00
tcrypt.h
tea.c
testmgr.c crypto: testmgr - Reenable sha1/aes in FIPS mode 2017-06-28 22:18:58 +08:00
testmgr.h crypto: testmgr - add testvector for pkcs1pad(rsa) 2017-06-20 11:21:29 +08:00
tgr192.c
twofish_common.c
twofish_generic.c
vmac.c
wp512.c
xcbc.c
xor.c crypto: xor - Fix warning when XOR_SELECT_TEMPLATE is unset 2016-08-31 23:00:48 +08:00
xts.c Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-05-02 15:53:46 -07:00