Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145410276
D53390.id165267.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D53390.id165267.diff
View Options
diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC
--- a/sys/amd64/conf/GENERIC
+++ b/sys/amd64/conf/GENERIC
@@ -389,3 +389,7 @@
# EFI devices
device efidev # EFI pseudo-device
device efirtc # EFI RTC
+
+# random(4)
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev
--- a/sys/arm64/conf/std.dev
+++ b/sys/arm64/conf/std.dev
@@ -122,3 +122,7 @@
# Wireless options
options IEEE80211_DEBUG # enable debug msgs
options IEEE80211_SUPPORT_MESH # enable 802.11s draft support
+
+# random(4)
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -2829,6 +2829,10 @@
# environment.
options RANDOM_ENABLE_ETHER # ether_input
+# On by default
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
+
# Module to enable execution of application via emulators like QEMU
options IMGACT_BINMISC
diff --git a/sys/conf/options b/sys/conf/options
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -960,6 +960,8 @@
# the uma slab allocator.
RANDOM_ENABLE_UMA opt_global.h
RANDOM_ENABLE_ETHER opt_global.h
+RANDOM_ENABLE_KBD opt_global.h
+RANDOM_ENABLE_MOUSE opt_global.h
# This options turns TPM into entropy source.
TPM_HARVEST opt_tpm.h
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -876,7 +876,9 @@
{
struct vt_window *vw = vd->vd_curwindow;
+#ifdef RANDOM_ENABLE_KBD
random_harvest_queue(&c, sizeof(c), RANDOM_KEYBOARD);
+#endif
#if VT_ALT_TO_ESC_HACK
if (c & RELKEY) {
switch (c & ~RELKEY) {
diff --git a/sys/dev/vt/vt_sysmouse.c b/sys/dev/vt/vt_sysmouse.c
--- a/sys/dev/vt/vt_sysmouse.c
+++ b/sys/dev/vt/vt_sysmouse.c
@@ -32,7 +32,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include "opt_evdev.h"
#include <sys/param.h>
@@ -222,7 +221,9 @@
unsigned char buf[MOUSE_SYS_PACKETSIZE];
int x, y, iy, z;
+#ifdef RANDOM_ENABLE_MOUSE
random_harvest_queue(mi, sizeof *mi, RANDOM_MOUSE);
+#endif
mtx_lock(&sysmouse_lock);
switch (mi->operation) {
diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC
--- a/sys/riscv/conf/GENERIC
+++ b/sys/riscv/conf/GENERIC
@@ -204,6 +204,10 @@
device iicbus # Bus support, required for iicoc below.
device iicoc # OpenCores I2C controller support
+# random(4)
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
+
# Include SoC specific configuration
include "std.allwinner"
include "std.cvitek"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 20, 11:58 AM (18 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28898869
Default Alt Text
D53390.id165267.diff (2 KB)
Attached To
Mode
D53390: random: allow disabling of entropy harvesting from keyboard & mice
Attached
Detach File
Event Timeline
Log In to Comment