From 0b2178a851859aeb0d832b83f2d074795afbd5d7 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 29 Aug 2021 06:46:18 +0300 Subject: [PATCH] mdevd: Use recent commit for -O --- extra/mdevd/checksums | 8 ++-- extra/mdevd/files/mdevd.conf | 71 +++++++++++++++++++++++++++++++++++- extra/mdevd/files/mdevd.run | 2 +- extra/mdevd/sources | 4 +- extra/mdevd/version | 2 +- 5 files changed, 78 insertions(+), 9 deletions(-) mode change 120000 => 100644 extra/mdevd/files/mdevd.conf diff --git a/extra/mdevd/checksums b/extra/mdevd/checksums index 68795527..c49b7e71 100644 --- a/extra/mdevd/checksums +++ b/extra/mdevd/checksums @@ -1,4 +1,4 @@ -ffd3b223b4cf0e51253b4a8f09cb88d70bf22693228ab0818af174a3f099dcd2 -b780b0ae650dda0c3ec5f8975174998af2d24c2a2e2be669b1bab46e73b1464d -cd002f2194c0a42f489016f5def883d9f2c39e76a3f602a181196688d0680851 -b3e6b95eaa9899939b96bfab6a8d982b15a1e04e9d12c272b83aed28c1305029 +cb2946e84aba2df0d7388448e28a7b50d2c8b252343d48b1db4882c2f2c8d16f +5377358c55b22217073ab68ad0917abcfb0f05dcf5c0c4f39a24538c5cb83f2d +f28498912c9ca997e2cf16ec745ac904a29f3c1f9c5e0a5821a37390ca76367a +75be917720e059b8cf41738463b2b2fd5cb6c04fbf36b6ce6966b6a2b72caa0f diff --git a/extra/mdevd/files/mdevd.conf b/extra/mdevd/files/mdevd.conf deleted file mode 120000 index 7b807a1d..00000000 --- a/extra/mdevd/files/mdevd.conf +++ /dev/null @@ -1 +0,0 @@ -../../../core/busybox/files/mdev.conf \ No newline at end of file diff --git a/extra/mdevd/files/mdevd.conf b/extra/mdevd/files/mdevd.conf new file mode 100644 index 00000000..0c88a022 --- /dev/null +++ b/extra/mdevd/files/mdevd.conf @@ -0,0 +1,70 @@ +# Configuration based on 'mdev-like-a-boss'. +# https://github.com/slashbeast/mdev-like-a-boss/blob/master/mdev.conf + +null root:root 666 @chmod 666 $MDEV +zero root:root 666 +full root:root 666 +random root:root 444 +urandom root:root 444 +hwrandom root:root 444 +grsec root:root 660 +kmem root:root 640 +mem root:root 640 + +port root:root 640 +console root:tty 600 @chmod 600 $MDEV +ptmx root:tty 666 +pty.* root:tty 660 +tty root:tty 666 +tty[0-9]* root:tty 660 +vcsa*[0-9]* root:tty 660 + +# Kernel based virtual machine. +kvm root:kvm 660 +vhost-net root:kvm 660 + +# Block devices. +ram([0-9]*) root:disk 660 >rd/%1 +loop([0-9]+) root:disk 660 >loop/%1 +sr[0-9]* root:cdrom 660 @ln -sf $MDEV cdrom +fd[0-9]* root:floppy 660 + +net/tun[0-9]* root:kvm 660 +net/tap[0-9]* root:root 600 +fuse root:root 666 +agpgart root:root 660 >misc/ +psaux root:root 660 >misc/ +rtc root:root 664 >misc/ + +# Audio stuff. +adsp root:audio 660 >sound/ +audio root:audio 660 >sound/ +dsp root:audio 660 >sound/ +mixer root:audio 660 >sound/ +sequencer.* root:audio 660 >sound/ +snd/.* root:audio 660 + +# Raid controllers. +cciss!(.*) root:disk 660 =cciss/%1 +ida!(.*) root:disk 660 =ida/%1 +rd!(.*) root:disk 660 =rd/%1 + +# Input stuff. +SUBSYSTEM=input;.* root:input 660 + +# Video stuff. +card[0-9] root:video 660 =dri/ +vbi[0-9] root:video 660 >v4l/ +video[0-9] root:video 660 >v4l/ +dri/.* root:video 660 + +# Don't create old usbdev* devices. +usbdev[0-9].[0-9]* root:root 660 ! + +# Stop creating x:x:x:x which looks like /dev/dm-*. +[0-9]+\:[0-9]+\:[0-9]+\:[0-9]+ root:root 660 ! + +# /dev/cpu support. +microcode root:root 600 =cpu/ +cpu([0-9]+) root:root 600 =cpu/%1/cpuid +msr([0-9]+) root:root 600 =cpu/%1/msr diff --git a/extra/mdevd/files/mdevd.run b/extra/mdevd/files/mdevd.run index 47d2d8fd..be6e2197 100755 --- a/extra/mdevd/files/mdevd.run +++ b/extra/mdevd/files/mdevd.run @@ -3,4 +3,4 @@ # Null the legacy hotplugger as the service will take over from here. printf '\n' 2>/dev/null > /proc/sys/kernel/hotplug -exec mdevd -f /etc/mdevd.conf +exec mdevd -f /etc/mdevd.conf -O 4 diff --git a/extra/mdevd/sources b/extra/mdevd/sources index ab5274fc..061c6b39 100644 --- a/extra/mdevd/sources +++ b/extra/mdevd/sources @@ -1,4 +1,4 @@ -https://skarnet.org/software/mdevd/mdevd-VERSION.tar.gz -https://skarnet.org/software/skalibs/skalibs-2.10.0.3.tar.gz skalibs +https://github.com/skarnet/mdevd/archive/VERSION.tar.gz +https://github.com/skarnet/skalibs/archive/b9fc60351f89d7ea01a4d25682076fcbbf33ef74.tar.gz skalibs files/mdevd.conf files/mdevd.run diff --git a/extra/mdevd/version b/extra/mdevd/version index 7898ae06..131b74d4 100644 --- a/extra/mdevd/version +++ b/extra/mdevd/version @@ -1 +1 @@ -0.1.4.0 3 +b61ab0373a724d38e059655d561b5fb3dcb2aff6 1