Module Name: src
Committed By: riastradh
Date: Fri May 13 09:40:02 UTC 2022
Modified Files:
src/sys/kern: kern_entropy.c
Log Message:
entropy(9): Update comment about where entropy_extract is allowed.
As of last month, it is forbidden in all hard interrupt context.
To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/kern/kern_entropy.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/kern_entropy.c
diff -u src/sys/kern/kern_entropy.c:1.55 src/sys/kern/kern_entropy.c:1.56
--- src/sys/kern/kern_entropy.c:1.55 Fri May 13 09:39:52 2022
+++ src/sys/kern/kern_entropy.c Fri May 13 09:40:02 2022
@@ -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 @@ sysctl_entropy_gather(SYSCTLFN_ARGS)
* 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)