[RFC 05/10] crypto: move testmgr to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
testmgr is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. This also provides a test of the generic crypto async. wait code. Signed-off-by: Gilad Ben-Yossef --- crypto/testmgr.c | 184

[RFC 10/10] crypto: adapt api sample to use async. op wait

2017-05-06 Thread Gilad Ben-Yossef
The code sample is waiting for an async. crypto op completion. Adapt sample to use the new generic infrastructure to do the same. Signed-off-by: Gilad Ben-Yossef --- Documentation/crypto/api-samples.rst | 52 +++- 1 file changed, 10

[RFC 09/10] ima: move to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
ima starts several async. crypto ops and waits for their completions. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- security/integrity/ima/ima_crypto.c | 56 +++-- 1 file changed, 17 insertions(+), 39

[RFC 08/10] cifs: move to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
cifs starts an async. crypto op and waits for their completion. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- fs/cifs/smb2ops.c | 30 -- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git

[RFC 07/10] fscrypt: move to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
fscrypt starts several async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- fs/crypto/crypto.c | 28 fs/crypto/fname.c | 36

[RFC 00/10] introduce crypto wait for async op function

2017-05-06 Thread Gilad Ben-Yossef
Many users of kernel async. crypto services have a pattern of starting an async. crypto op and than using a completion to wait for it to end, resulting of the same code repeating itself in multiple places, sometime with errors. This patch aims to introduce a generic "wait for async. crypto op to

[RFC 06/10] dm: move dm-verity to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
dm-verity is starting async. crypto ops and waiting for them to complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- drivers/md/dm-verity-target.c | 81 +++ drivers/md/dm-verity.h| 5 ---

[PATCH] crypto: mediatek - drop .owner field in mtk_crypto_driver

2017-05-06 Thread Geliang Tang
Drop .owner field in mtk_crypto_driver, since platform_driver_register() will set it automatically. Signed-off-by: Geliang Tang --- drivers/crypto/mediatek/mtk-platform.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/mediatek/mtk-platform.c

[RFC 02/10] crypto: move pub key to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
public_key_verify_signature() is starting an async crypto op and waiting for it to complete. Move it over to generic code doing the same. This also fixes a bug in which the code was passing the CRYPTO_TFM_REQ_MAY_BACKLOG flag to akcipher_request_set_callback() but was not correctly testing for

[RFC 01/10] crypto: factor async completion for general use

2017-05-06 Thread Gilad Ben-Yossef
Invoking a possibly async. crypto op and waiting for completion while correctly handling backlog processing is a common task in the crypto API implementation and outside users of it. This patch re-factors one of the in crypto API implementation in preparation for using it across the board instead

[RFC 04/10] crypto: move gcm to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
gcm is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. Signed-off-by: Gilad Ben-Yossef --- crypto/gcm.c | 34 ++ 1 file changed, 6 insertions(+), 28 deletions(-) diff --git

[RFC 03/10] crypto: move drbg to generic async completion

2017-05-06 Thread Gilad Ben-Yossef
DRBG is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. As part of the move the wait for op completion lost its _interruptible property. However, since each invocation is supposed to be short and since no other user in the kernel does the