Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145568170
D53390.1778211962.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D53390.1778211962.diff
View Options
diff --git a/sys/amd64/conf/DEFAULTS b/sys/amd64/conf/DEFAULTS
--- a/sys/amd64/conf/DEFAULTS
+++ b/sys/amd64/conf/DEFAULTS
@@ -26,3 +26,7 @@
options CC_CUBIC # include CUBIC congestion control
options NETLINK # netlink(4) support
+
+# random(4)
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
diff --git a/sys/arm/conf/DEFAULTS b/sys/arm/conf/DEFAULTS
--- a/sys/arm/conf/DEFAULTS
+++ b/sys/arm/conf/DEFAULTS
@@ -8,3 +8,7 @@
options CC_CUBIC # include CUBIC congestion control
options INTRNG # All arm systems use INTRNG these days
+
+# random(4)
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
diff --git a/sys/arm64/conf/DEFAULTS b/sys/arm64/conf/DEFAULTS
--- a/sys/arm64/conf/DEFAULTS
+++ b/sys/arm64/conf/DEFAULTS
@@ -18,3 +18,7 @@
options INTRNG
options NETLINK # netlink(4) 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/powerpc/conf/DEFAULTS b/sys/powerpc/conf/DEFAULTS
--- a/sys/powerpc/conf/DEFAULTS
+++ b/sys/powerpc/conf/DEFAULTS
@@ -15,3 +15,7 @@
options CC_CUBIC # include CUBIC congestion control
options NETLINK # netlink(4) support
+
+# random(4)
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
diff --git a/sys/riscv/conf/DEFAULTS b/sys/riscv/conf/DEFAULTS
--- a/sys/riscv/conf/DEFAULTS
+++ b/sys/riscv/conf/DEFAULTS
@@ -18,3 +18,7 @@
options INTRNG
options NETLINK # netlink(4) support
+
+# random(4)
+options RANDOM_ENABLE_KBD
+options RANDOM_ENABLE_MOUSE
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 8, 3:46 AM (15 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28599690
Default Alt Text
D53390.1778211962.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