Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/random/random_infra.c
Show All 12 Lines | |||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/random.h> | #include <sys/random.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <dev/random/randomdev.h> | #include <dev/random/randomdev.h> | ||||
/* Set up the sysctl root node for the entropy device */ | /* Set up the sysctl root node for the entropy device */ | ||||
SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW, 0, | SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | ||||
"Cryptographically Secure Random Number Generator"); | "Cryptographically Secure Random Number Generator"); | ||||
SYSCTL_NODE(_kern_random, OID_AUTO, initial_seeding, CTLFLAG_RW, 0, | SYSCTL_NODE(_kern_random, OID_AUTO, initial_seeding, | ||||
CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | |||||
"Initial seeding control and information"); | "Initial seeding control and information"); | ||||
/* | /* | ||||
* N.B., this is a dangerous default, but it matches the behavior prior to | * N.B., this is a dangerous default, but it matches the behavior prior to | ||||
* r346250 (and, say, OpenBSD -- although they get some guaranteed saved | * r346250 (and, say, OpenBSD -- although they get some guaranteed saved | ||||
* entropy from the prior boot because of their KARL system, on RW media). | * entropy from the prior boot because of their KARL system, on RW media). | ||||
*/ | */ | ||||
bool random_bypass_before_seeding = true; | bool random_bypass_before_seeding = true; | ||||
Show All 12 Lines |