Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern entropy(9): Update comment about where entropy_extr...



details:   https://anonhg.NetBSD.org/src/rev/80e4441d70f3
branches:  trunk
changeset: 366066:80e4441d70f3
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri May 13 09:40:02 2022 +0000

description:
entropy(9): Update comment about where entropy_extract is allowed.

As of last month, it is forbidden in all hard interrupt context.

diffstat:

 sys/kern/kern_entropy.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r ca6e21f9b343 -r 80e4441d70f3 sys/kern/kern_entropy.c
--- a/sys/kern/kern_entropy.c   Fri May 13 09:39:52 2022 +0000
+++ b/sys/kern/kern_entropy.c   Fri May 13 09:40:02 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_entropy.c,v 1.55 2022/05/13 09:39:52 riastradh Exp $      */
+/*     $NetBSD: kern_entropy.c,v 1.56 2022/05/13 09:40:02 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.55 2022/05/13 09:39:52 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.56 2022/05/13 09:40:02 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -1364,9 +1364,8 @@
  *             EINTR/ERESTART  No entropy, ENTROPY_SIG set, and interrupted.
  *
  *     If ENTROPY_WAIT is set, allowed only in thread context.  If
- *     ENTROPY_WAIT is not set, allowed up to IPL_VM.  (XXX That's
- *     awfully high...  Do we really need it in hard interrupts?  This
- *     arises from use of cprng_strong(9).)
+ *     ENTROPY_WAIT is not set, allowed also in softint context.
+ *     Forbidden in hard interrupt context.
  */
 int
 entropy_extract(void *buf, size_t len, int flags)



Home | Main Index | Thread Index | Old Index