Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-doc
Path: blob/main/website/static/security/patches/EN-14:01/random-9.1.patch
18096 views
1
Index: sys/dev/random/probe.c
2
===================================================================
3
--- sys/dev/random/probe.c (revision 260523)
4
+++ sys/dev/random/probe.c (working copy)
5
@@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$");
6
7
#include <sys/types.h>
8
#include <sys/param.h>
9
+#include <sys/systm.h>
10
+#include <sys/kernel.h>
11
#include <sys/malloc.h>
12
#include <sys/random.h>
13
#include <sys/selinfo.h>
14
@@ -57,7 +59,12 @@ random_ident_hardware(struct random_systat *systat
15
/* Then go looking for hardware */
16
#if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
17
if (via_feature_rng & VIA_HAS_RNG) {
18
- *systat = random_nehemiah;
19
+ int enable;
20
+
21
+ enable = 0;
22
+ TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable);
23
+ if (enable)
24
+ *systat = random_nehemiah;
25
}
26
#endif
27
}
28
29