Lines Matching refs:pctx
204 struct rng_parent_ctx *pctx; in rng_bind() local
207 pctx = kzalloc(sizeof(*pctx), GFP_KERNEL); in rng_bind()
208 if (!pctx) in rng_bind()
213 kfree(pctx); in rng_bind()
217 pctx->drng = rng; in rng_bind()
218 return pctx; in rng_bind()
223 struct rng_parent_ctx *pctx = private; in rng_release() local
225 if (unlikely(!pctx)) in rng_release()
227 crypto_free_rng(pctx->drng); in rng_release()
228 kfree_sensitive(pctx->entropy); in rng_release()
229 kfree_sensitive(pctx); in rng_release()
245 struct rng_parent_ctx *pctx = private; in rng_accept_parent() local
263 ctx->drng = pctx->drng; in rng_accept_parent()
271 if (IS_ENABLED(CONFIG_CRYPTO_USER_API_RNG_CAVP) && pctx->entropy) in rng_accept_parent()
279 struct rng_parent_ctx *pctx = private; in rng_setkey() local
284 return crypto_rng_reset(pctx->drng, seed, seedlen); in rng_setkey()
290 struct rng_parent_ctx *pctx = private; in rng_setentropy() local
296 if (pctx->entropy) in rng_setentropy()
308 crypto_rng_alg(pctx->drng)->set_ent(pctx->drng, kentropy, len); in rng_setentropy()
313 pctx->entropy = kentropy; in rng_setentropy()