aboutsummaryrefslogtreecommitdiff
path: root/share/security/patches/EN-14:01/random-9.1.patch
diff options
context:
space:
mode:
Diffstat (limited to 'share/security/patches/EN-14:01/random-9.1.patch')
-rw-r--r--share/security/patches/EN-14:01/random-9.1.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/share/security/patches/EN-14:01/random-9.1.patch b/share/security/patches/EN-14:01/random-9.1.patch
new file mode 100644
index 0000000000..bb3caba001
--- /dev/null
+++ b/share/security/patches/EN-14:01/random-9.1.patch
@@ -0,0 +1,27 @@
+Index: sys/dev/random/probe.c
+===================================================================
+--- sys/dev/random/probe.c (revision 260523)
++++ sys/dev/random/probe.c (working copy)
+@@ -30,6 +30,8 @@ __FBSDID("$FreeBSD$");
+
+ #include <sys/types.h>
+ #include <sys/param.h>
++#include <sys/systm.h>
++#include <sys/kernel.h>
+ #include <sys/malloc.h>
+ #include <sys/random.h>
+ #include <sys/selinfo.h>
+@@ -57,7 +59,12 @@ random_ident_hardware(struct random_systat *systat
+ /* Then go looking for hardware */
+ #if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
+ if (via_feature_rng & VIA_HAS_RNG) {
+- *systat = random_nehemiah;
++ int enable;
++
++ enable = 0;
++ TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable);
++ if (enable)
++ *systat = random_nehemiah;
+ }
+ #endif
+ }