random_infra.c (3ee1d5bb9dc2db929b19ca59421d197153dbdc08) | random_infra.c (4312ebfe0bbf314a0d5d1b6d14d003673255dd0d) |
---|---|
1/*- 2 * Copyright (c) 2015 Mark R V Murray 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 24 unchanged lines hidden (view full) --- 33#include <sys/kernel.h> 34#include <sys/malloc.h> 35#include <sys/random.h> 36#include <sys/sysctl.h> 37 38#include <dev/random/randomdev.h> 39 40/* Set up the sysctl root node for the entropy device */ | 1/*- 2 * Copyright (c) 2015 Mark R V Murray 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 24 unchanged lines hidden (view full) --- 33#include <sys/kernel.h> 34#include <sys/malloc.h> 35#include <sys/random.h> 36#include <sys/sysctl.h> 37 38#include <dev/random/randomdev.h> 39 40/* Set up the sysctl root node for the entropy device */ |
41SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW, 0, | 41SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, |
42 "Cryptographically Secure Random Number Generator"); | 42 "Cryptographically Secure Random Number Generator"); |
43SYSCTL_NODE(_kern_random, OID_AUTO, initial_seeding, CTLFLAG_RW, 0, | 43SYSCTL_NODE(_kern_random, OID_AUTO, initial_seeding, 44 CTLFLAG_RW | CTLFLAG_MPSAFE, 0, |
44 "Initial seeding control and information"); 45 46/* 47 * N.B., this is a dangerous default, but it matches the behavior prior to 48 * r346250 (and, say, OpenBSD -- although they get some guaranteed saved 49 * entropy from the prior boot because of their KARL system, on RW media). 50 */ 51bool random_bypass_before_seeding = true; --- 53 unchanged lines hidden --- | 45 "Initial seeding control and information"); 46 47/* 48 * N.B., this is a dangerous default, but it matches the behavior prior to 49 * r346250 (and, say, OpenBSD -- although they get some guaranteed saved 50 * entropy from the prior boot because of their KARL system, on RW media). 51 */ 52bool random_bypass_before_seeding = true; --- 53 unchanged lines hidden --- |