Module Name: src
Committed By: riastradh
Date: Wed May 24 20:22:12 UTC 2023
Modified Files:
src/sys/kern: kern_entropy.c
Log Message:
entropy(9): On flags change, cancel any scheduled consolidation.
We've been instructed to lose confidence in existing entropy sources,
so let's make sure to re-gather enough entropy before the next
consolidation can happen, in case some of what would be counted in
consolidation is from those entropy sources.
XXX pullup-10
To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 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.59 src/sys/kern/kern_entropy.c:1.60
--- src/sys/kern/kern_entropy.c:1.59 Fri Mar 3 12:52:49 2023
+++ src/sys/kern/kern_entropy.c Wed May 24 20:22:12 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_entropy.c,v 1.59 2023/03/03 12:52:49 riastradh Exp $ */
+/* $NetBSD: kern_entropy.c,v 1.60 2023/05/24 20:22:12 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.59 2023/03/03 12:52:49 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.60 2023/05/24 20:22:12 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -2414,6 +2414,7 @@ entropy_ioctl(unsigned long cmd, void *d
E->pending = 0;
atomic_store_relaxed(&E->needed,
ENTROPY_CAPACITY*NBBY);
+ E->consolidate = false;
mutex_exit(&E->lock);
}