Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern random(4): Report number of bytes ready to read, no...
details: https://anonhg.NetBSD.org/src/rev/482b64874a21
branches: trunk
changeset: 373786:482b64874a21
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Mar 01 08:13:54 2023 +0000
description:
random(4): Report number of bytes ready to read, not number of bits.
Only affects systems with the diagnostic and testing option
kern.entropy.depletion=1.
XXX pullup-10
diffstat:
sys/kern/kern_entropy.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r eda2058c9a06 -r 482b64874a21 sys/kern/kern_entropy.c
--- a/sys/kern/kern_entropy.c Wed Mar 01 08:13:44 2023 +0000
+++ b/sys/kern/kern_entropy.c Wed Mar 01 08:13:54 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_entropy.c,v 1.57 2022/08/05 23:43:46 riastradh Exp $ */
+/* $NetBSD: kern_entropy.c,v 1.58 2023/03/01 08:13:54 riastradh Exp $ */
/*-
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.57 2022/08/05 23:43:46 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.58 2023/03/01 08:13:54 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -1554,7 +1554,7 @@
ret = 0;
} else {
if (atomic_load_relaxed(&entropy_depletion))
- kn->kn_data = ENTROPY_CAPACITY*NBBY;
+ kn->kn_data = ENTROPY_CAPACITY; /* bytes */
else
kn->kn_data = MIN(INT64_MAX, SSIZE_MAX);
ret = 1;
Home |
Main Index |
Thread Index |
Old Index