crypto: drbg - move to generic async completion
DRBG is starting an async. crypto op and waiting for it complete. Move it over to generic code doing the same. The code now also passes CRYPTO_TFM_REQ_MAY_SLEEP flag indicating crypto request memory allocation may use GFP_KERNEL which should be perfectly fine as the code is obviously sleeping for the completion of the request any way. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
0ca2a04ac3
commit
85a2dea4bd
@@ -126,8 +126,7 @@ struct drbg_state {
|
||||
__u8 *ctr_null_value; /* CTR mode aligned zero buf */
|
||||
__u8 *outscratchpadbuf; /* CTR mode output scratchpad */
|
||||
__u8 *outscratchpad; /* CTR mode aligned outbuf */
|
||||
struct completion ctr_completion; /* CTR mode async handler */
|
||||
int ctr_async_err; /* CTR mode async error */
|
||||
struct crypto_wait ctr_wait; /* CTR mode async wait obj */
|
||||
|
||||
bool seeded; /* DRBG fully seeded? */
|
||||
bool pr; /* Prediction resistance enabled? */
|
||||
|
||||
Reference in New Issue
Block a user