Lines Matching +full:retain +full:- +full:state +full:- +full:shutdown
2 * algif_rng: User-space interface for random number generators
4 * This file provides the user-space API for random number generators.
11 * 1. Redistributions of source code must retain the above copyright
25 * the restrictions contained in a BSD-style copyright.)
50 MODULE_DESCRIPTION("User-space interface for random number generators");
61 struct sock *sk = sock->sk; in rng_recvmsg()
63 struct rng_ctx *ctx = ask->private; in rng_recvmsg()
64 int err = -EFAULT; in rng_recvmsg()
85 genlen = crypto_rng_get_bytes(ctx->drng, result, len); in rng_recvmsg()
103 .shutdown = sock_no_shutdown,
129 struct rng_ctx *ctx = ask->private; in rng_sock_destruct()
131 sock_kfree_s(sk, ctx, ctx->len); in rng_sock_destruct()
143 return -ENOMEM; in rng_accept_parent()
145 ctx->len = len; in rng_accept_parent()
148 * No seeding done at that point -- if multiple accepts are in rng_accept_parent()
150 * state of the RNG. in rng_accept_parent()
153 ctx->drng = private; in rng_accept_parent()
154 ask->private = ctx; in rng_accept_parent()
155 sk->sk_destruct = rng_sock_destruct; in rng_accept_parent()