Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164359615
D53390.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D53390.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
@@ -326,6 +326,8 @@
device rdrand_rng # Intel Bull Mountain RNG
device tpm # Trusted Platform Module
options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
# USB support
options USB_DEBUG # enable debug msgs
diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL
--- a/sys/amd64/conf/MINIMAL
+++ b/sys/amd64/conf/MINIMAL
@@ -124,6 +124,8 @@
device rdrand_rng # Intel Bull Mountain RNG
device tpm # Trusted Platform Module
options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
# VirtIO support
device virtio # Generic VirtIO bus (required)
diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC
--- a/sys/arm/conf/GENERIC
+++ b/sys/arm/conf/GENERIC
@@ -219,6 +219,8 @@
# random(4)
device tpm # Trusted Platform Module
options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
# Sound support
device sound
diff --git a/sys/arm64/conf/std.arm64 b/sys/arm64/conf/std.arm64
--- a/sys/arm64/conf/std.arm64
+++ b/sys/arm64/conf/std.arm64
@@ -110,3 +110,5 @@
# random(4)
device tpm # Trusted Platform Module
options RANDOM_ENABLE_TPM # enable entropy from TPM 2.0
+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
@@ -2825,6 +2825,8 @@
# environment.
options RANDOM_ENABLE_ETHER # ether_input
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
options RANDOM_ENABLE_TPM # implies TPM_HARVEST
# Module to enable execution of application via emulators like QEMU
diff --git a/sys/conf/options b/sys/conf/options
--- a/sys/conf/options
+++ b/sys/conf/options
@@ -956,6 +956,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
RANDOM_ENABLE_TPM opt_global.h
# This options turns TPM into entropy source.
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/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64
--- a/sys/powerpc/conf/GENERIC64
+++ b/sys/powerpc/conf/GENERIC64
@@ -207,6 +207,10 @@
# Note that 'bpf' is required for DHCP.
device bpf # Berkeley packet filter
+# random(4)
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
+
# USB support
options USB_DEBUG # enable debug msgs
device uhci # UHCI PCI->USB interface
diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE
--- a/sys/powerpc/conf/GENERIC64LE
+++ b/sys/powerpc/conf/GENERIC64LE
@@ -203,6 +203,10 @@
# Note that 'bpf' is required for DHCP.
device bpf # Berkeley packet filter
+# random(4)
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
+
# USB support
options USB_DEBUG # enable debug msgs
device uhci # UHCI PCI->USB interface
diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC
--- a/sys/riscv/conf/GENERIC
+++ b/sys/riscv/conf/GENERIC
@@ -197,6 +197,10 @@
# Note that 'bpf' is required for DHCP.
device bpf # Berkeley packet filter
+# random(4)
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
+
# Flattened Device Tree
options FDT
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 1, 4:08 AM (8 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35789578
Default Alt Text
D53390.diff (4 KB)
Attached To
Mode
D53390: random: allow disabling of entropy harvesting from keyboard & mice
Attached
Detach File
Event Timeline
Log In to Comment