• Home
  • Raw
  • Download

Lines Matching refs:nbytes

490 			    int nbytes)  in _mix_pool_bytes()  argument
508 while (nbytes--) { in _mix_pool_bytes()
537 int nbytes) in __mix_pool_bytes() argument
539 trace_mix_pool_bytes_nolock(r->name, nbytes, _RET_IP_); in __mix_pool_bytes()
540 _mix_pool_bytes(r, in, nbytes); in __mix_pool_bytes()
544 int nbytes) in mix_pool_bytes() argument
548 trace_mix_pool_bytes(r->name, nbytes, _RET_IP_); in mix_pool_bytes()
550 _mix_pool_bytes(r, in, nbytes); in mix_pool_bytes()
948 size_t nbytes, int min, int rsvd);
955 static void _xfer_secondary_pool(struct entropy_store *r, size_t nbytes);
956 static void xfer_secondary_pool(struct entropy_store *r, size_t nbytes) in xfer_secondary_pool() argument
959 r->entropy_count >= (nbytes << (ENTROPY_SHIFT + 3)) || in xfer_secondary_pool()
972 _xfer_secondary_pool(r, nbytes); in xfer_secondary_pool()
975 static void _xfer_secondary_pool(struct entropy_store *r, size_t nbytes) in _xfer_secondary_pool() argument
981 int bytes = nbytes; in _xfer_secondary_pool()
988 trace_xfer_secondary_pool(r->name, bytes * 8, nbytes * 8, in _xfer_secondary_pool()
1016 static size_t account(struct entropy_store *r, size_t nbytes, int min, in account() argument
1027 ibytes = nbytes; in account()
1134 size_t nbytes, int min, int reserved) in extract_entropy() argument
1156 trace_extract_entropy(r->name, nbytes, ENTROPY_BITS(r), _RET_IP_); in extract_entropy()
1157 xfer_secondary_pool(r, nbytes); in extract_entropy()
1158 nbytes = account(r, nbytes, min, reserved); in extract_entropy()
1160 while (nbytes) { in extract_entropy()
1170 i = min_t(int, nbytes, EXTRACT_SIZE); in extract_entropy()
1172 nbytes -= i; in extract_entropy()
1188 size_t nbytes) in extract_entropy_user() argument
1192 int large_request = (nbytes > 256); in extract_entropy_user()
1194 trace_extract_entropy_user(r->name, nbytes, ENTROPY_BITS(r), _RET_IP_); in extract_entropy_user()
1195 xfer_secondary_pool(r, nbytes); in extract_entropy_user()
1196 nbytes = account(r, nbytes, 0, 0); in extract_entropy_user()
1198 while (nbytes) { in extract_entropy_user()
1209 i = min_t(int, nbytes, EXTRACT_SIZE); in extract_entropy_user()
1215 nbytes -= i; in extract_entropy_user()
1233 void get_random_bytes(void *buf, int nbytes) in get_random_bytes() argument
1242 trace_get_random_bytes(nbytes, _RET_IP_); in get_random_bytes()
1243 extract_entropy(&nonblocking_pool, buf, nbytes, 0, 0); in get_random_bytes()
1257 void get_random_bytes_arch(void *buf, int nbytes) in get_random_bytes_arch() argument
1261 trace_get_random_bytes_arch(nbytes, _RET_IP_); in get_random_bytes_arch()
1262 while (nbytes) { in get_random_bytes_arch()
1264 int chunk = min(nbytes, (int)sizeof(unsigned long)); in get_random_bytes_arch()
1271 nbytes -= chunk; in get_random_bytes_arch()
1274 if (nbytes) in get_random_bytes_arch()
1275 extract_entropy(&nonblocking_pool, p, nbytes, 0, 0); in get_random_bytes_arch()
1343 _random_read(int nonblock, char __user *buf, size_t nbytes) in _random_read() argument
1347 if (nbytes == 0) in _random_read()
1350 nbytes = min_t(size_t, nbytes, SEC_XFER_SIZE); in _random_read()
1352 n = extract_entropy_user(&blocking_pool, buf, nbytes); in _random_read()
1355 trace_random_read(n*8, (nbytes-n)*8, in _random_read()
1374 random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) in random_read() argument
1376 return _random_read(file->f_flags & O_NONBLOCK, buf, nbytes); in random_read()
1380 urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) in urandom_read() argument
1389 nbytes = min_t(size_t, nbytes, INT_MAX >> (ENTROPY_SHIFT + 3)); in urandom_read()
1390 ret = extract_entropy_user(&nonblocking_pool, buf, nbytes); in urandom_read()
1392 trace_urandom_read(8 * nbytes, ENTROPY_BITS(&nonblocking_pool), in urandom_read()