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