Module Name: src Committed By: riastradh Date: Fri Mar 18 23:35:07 UTC 2022
Modified Files: src/sys/kern: kern_entropy.c Log Message: entropy(9): Request entropy after the softint is enabled. Otherwise, there is a window during which interrupts are running, but the softint is not, so if many interrupts queue (low-entropy) samples early at boot, they might get dropped on the floor. This could happen, for instance, with a PCI RNG like ubsec(4) or hifn(4) which requests entropy and processes it in its own hard interrupt handler. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 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.37 src/sys/kern/kern_entropy.c:1.38 --- src/sys/kern/kern_entropy.c:1.37 Fri Mar 18 23:34:56 2022 +++ src/sys/kern/kern_entropy.c Fri Mar 18 23:35:07 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_entropy.c,v 1.37 2022/03/18 23:34:56 riastradh Exp $ */ +/* $NetBSD: kern_entropy.c,v 1.38 2022/03/18 23:35:07 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.37 2022/03/18 23:34:56 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_entropy.c,v 1.38 2022/03/18 23:35:07 riastradh Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -2431,6 +2431,7 @@ rnd_init_softint(void) { entropy_init_late(); + entropy_bootrequest(); } int