Lines Matching refs:pctx
202 struct rng_parent_ctx *pctx; in rng_bind() local
205 pctx = kzalloc(sizeof(*pctx), GFP_KERNEL); in rng_bind()
206 if (!pctx) in rng_bind()
211 kfree(pctx); in rng_bind()
215 pctx->drng = rng; in rng_bind()
216 return pctx; in rng_bind()
221 struct rng_parent_ctx *pctx = private; in rng_release() local
223 if (unlikely(!pctx)) in rng_release()
225 crypto_free_rng(pctx->drng); in rng_release()
226 kfree_sensitive(pctx->entropy); in rng_release()
227 kfree_sensitive(pctx); in rng_release()
243 struct rng_parent_ctx *pctx = private; in rng_accept_parent() local
261 ctx->drng = pctx->drng; in rng_accept_parent()
269 if (IS_ENABLED(CONFIG_CRYPTO_USER_API_RNG_CAVP) && pctx->entropy) in rng_accept_parent()
277 struct rng_parent_ctx *pctx = private; in rng_setkey() local
282 return crypto_rng_reset(pctx->drng, seed, seedlen); in rng_setkey()
288 struct rng_parent_ctx *pctx = private; in rng_setentropy() local
294 if (pctx->entropy) in rng_setentropy()
306 crypto_rng_alg(pctx->drng)->set_ent(pctx->drng, kentropy, len); in rng_setentropy()
311 pctx->entropy = kentropy; in rng_setentropy()