Moving Ubuntu to upstream udev rules
Have been going through our udev rules and comparing them to those in the package as the upstream rules, and have noted about a page of things either we need to change or need to change in the upstream rules.
Some of these I care about, some of them I'm not fussed - but we should at least chat about them.
modprobe called without -b:
without -b, the modprobe calls in udev are not checked against the blacklist, making it damned hard to disable automatic module loading
please add -b to the modprobe calls.
ide-scsi
discussed on IRC, DO NOT WANT
ch
this scsi driver (tape changers) is missing a modalias, the following rule is needed to load it (or a kernel patch):
SUBSYSTEM=="scsi", ATTR{type}=="8", RUN+="/sbin/modprobe -b ch"tifm
your rules are less careful than ours, we do:
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe
-b tifm_sd"
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe-b tifm_ms"
firmware
if we don't copy the default rules into the initramfs (to get around the many GROUP= in there), we still need to load firmware.
could this rule be separated out into a different file?
scd/sr
while the kernel still calls them sr, that prefix is deprecated. You symlink the new name to the old one, we do it the other way around to make it clearer:
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%
n"
rtc
our rtc rules are more careful about only symlinking the CMOS to /dev/rtc:
SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc"
additionally, we place these in the "audio" group
SUBSYSTEM=="rtc", GROUP="audio"
dv1394
I couldn't work out why you symlink the kernelish names to their proper names, should this not be:
KERNEL=="dv1394*", NAME="dv1394/%n"
raw1394
This should be in the "disk" group, not the "video" group; it can be used to execute code as root
names
you rename some devices and disagree with devices.txt
rawctl -> raw/rawctl
you also don't rename some devices, and thus disagree
KERNEL=="controlC[0-9]*", NAME="snd/%k"
KERNEL=="hwC[D0-9]*", NAME="snd/%k"
KERNEL=="midiC[D0-9]*", NAME="snd/%k"
KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
KERNEL=="seq", NAME="snd/%k"
KERNEL=="timer", NAME="snd/%k"
KERNEL=="device-mapper", NAME="mapper/control"
KERNEL=="capi", NAME="capi20"
KERNEL=="capi[0-9]*", NAME="capi/%n"
KERNEL=="zapctl", NAME="zap/ctl"
KERNEL=="zaptimer", NAME="zap/timer"
KERNEL=="zapchannel", NAME="zap/channel"
KERNEL=="zappseudo", NAME="zap/pseudo"
KERNEL=="zap[0-9]*", NAME="zap/%n"symlinks
you have lots of extra symlinks, any particular reason? are you paid by the symlink? :p
X0R -> null ??!! WTF
ramdisk -> ram0
ram -> ram1
lirc -> lirc0
js* -> input/js* - aren't these different kernel drivers?
vbi -> vbi0
radio -> radio0
video -> video0
fb -> fb0
par* -> lp* ??
ftape -> qft0
hw_random -> hwrng - we just rename, and don't symlink the old name
sbpcd -> sbpcd0
xpram* -> slram*
sxctl -> specialix_sxctl - shouldn't this be just a rename?
rioctl -> specialix_rioctl - shouldn't this be just a rename? no /dev/pilot? :)
permissions
dri/card* 666 ???!!!
fuse 666 ???!!!
bus/usb/* 644 instead of 664?
tty 620 instead of 600? your ttys are writable?
groups
no cdrom group?
no scanner group?
no tape group?
no dialout group? - this may be Debianish, but we rely on it
no audio group?
ppdev devices not in the lp group?
nvram in group kmem not nvram?
Scott
Signature · 2 lines
Scott James Remnant [email protected]
Quoted 8 lines · Scott James Remnant
Have been going through our udev rules and comparing them to those in the package as the upstream rules, and have noted about a page of things either we need to change or need to change in the upstream rules.
Some of these I care about, some of them I'm not fussed - but we should at least chat about them.
Quoted 6 lines
modprobe called without -b:
without -b, the modprobe calls in udev are not checked against the blacklist, making it damned hard to disable automatic module loading
please add -b to the modprobe calls.
Done.
Quoted 3 lines
ide-scsi
discussed on IRC, DO NOT WANT
The driver is dead, and the rule removed.
Quoted 6 lines
ch
this scsi driver (tape changers) is missing a modalias, the following rule is needed to load it (or a kernel patch):
SUBSYSTEM="scsi", ATTR{type}="8", RUN+="/sbin/modprobe -b ch"
The ch module should get an alias:
scsi:t-0x09*
instead. I added the rule for now, but it should be removed when it's in the kernel.
Review
Quoted 8 lines
tifm
your rules are less careful than ours, we do:
SUBSYSTEM="tifm", ENV{TIFM_CARD_TYPE}="SD", RUN+="/sbin/modprobe(quoted diff) +0
-2-b tifm_sd" SUBSYSTEM="tifm", ENV{TIFM_CARD_TYPE}="MS", RUN+="/sbin/modprobe -b tifm_ms"
Added. :)
Quoted 6 lines
firmware
if we don't copy the default rules into the initramfs (to get around the many GROUP= in there), we still need to load firmware.
could this rule be separated out into a different file?
Done.
Quoted 7 lines
scd/sr
while the kernel still calls them sr, that prefix is deprecated. You symlink the new name to the old one, we do it the other way around to make it clearer:
SUBSYSTEM="block", KERNEL="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%
We do not want to change kernel names unless absolutely needed, especially for block devices we don't want to do that.
Where does the "deprecated prefix" information comes from? We should check with the kernel SCSI maintainers, and then do this, if it's the right thing.
Quoted 6 lines
rtc
our rtc rules are more careful about only symlinking the CMOS to
/dev/rtc:SUBSYSTEM="rtc", DRIVERS="rtc_cmos", SYMLINK+="rtc"
Sounds fine if we do not want that for other drivers? It's only compatibility for old x86 behavior?
Quoted 3 lines
additionally, we place these in the "audio" group
SUBSYSTEM="rtc", GROUP="audio"
Hmm, that sounds like a really weird workaround of some audio problem. Is this really what we want. :)
Quoted 6 lines
dv1394
I couldn't work out why you symlink the kernelish names to their proper names, should this not be:
KERNEL="dv1394*", NAME="dv1394/%n"
Same here, there was no clear rule, and we seem to need both, and then we usually do not switch names and links around if we have both anyway.
But I don't mind here to do that, this driver is almost dead anyway, and will go some day.
Quoted 4 lines
raw1394
This should be in the "disk" group, not the "video" group; it can be used to execute code as root
It may not belong into be in the "video" group, but you definitely also don't want to put anybody in the "disk" group to access it, it's almost the same as being root. We can leave it as root, if we need to change it for security measures.
You can not execute code on the host, only on a device, which may be another box connected over firewire, right?
Quoted 5 lines
names
you rename some devices and disagree with devices.txt
rawctl -> raw/rawctl
The tools use that, if I remember. Someone maintaining the tools should tell, devices.txt is pretty unreliable sometimes.
Quoted 8 lines
you also don't rename some devices, and thus disagree
KERNEL="controlC[0-9]*", NAME="snd/%k" KERNEL="hwC[D0-9]*", NAME="snd/%k" KERNEL="midiC[D0-9]*", NAME="snd/%k" KERNEL="pcmC[D0-9cp]*", NAME="snd/%k" KERNEL="seq", NAME="snd/%k" KERNEL="timer", NAME="snd/%k"
That's in packages/40-alsa.rules. We do not carry it in the default udev rules, but in the alsa package.
Quoted 1 line
KERNEL="device-mapper", NAME="mapper/control"
It's only in suse/64-device-mapper.rules, because upstream device-mapper does not integrate with udev. The rules belong into the dmsetup package.
Ubuntu carries the "dmsetup export" patch, so I have no problem moving a copy to the packages directory, and let the Red Hat guys find out when they want to fix their stuff. :)
Quoted 2 lines
KERNEL="capi", NAME="capi20"
KERNEL="capi[0-9]*", NAME="capi/%n"It's in the packages/40-isdn.rules rules, they are installed with the ISDN tools.
Quoted 5 lines
KERNEL="zapctl", NAME="zap/ctl"
KERNEL="zaptimer", NAME="zap/timer"
KERNEL="zapchannel", NAME="zap/channel"
KERNEL="zappseudo", NAME="zap/pseudo"
KERNEL="zap[0-9]*", NAME="zap/%n"That driver is dead, and renamed to something else. These rules are in:
packages/40-zaptel.rules though.
Quoted 6 lines
symlinks
you have lots of extra symlinks, any particular reason? are you paid by the symlink? :p
X0R -> null ??!! WTF
It's in devices.txt. :) Harald wanted it. :)
Quoted 4 lines
ramdisk -> ram0
ram -> ram1
lirc -> lirc0
js* -> input/js* - aren't these different kernel drivers?I have no idea. Maybe remove them? Harald?
Quoted 3 lines
vbi -> vbi0
radio -> radio0
video -> video0That is needed for some old tools. People have complained.
Quoted 3 lines
fb -> fb0
par* -> lp* ??
ftape -> qft0No idea. Harald?
Quoted 1 line
hw_random -> hwrng - we just rename, and don't symlink the old name
Sounds fine.
Quoted 2 lines
sbpcd -> sbpcd0
xpram* -> slram*No idea, never seen. Remove it and wait for someone to complain? Harald?
Quoted 2 lines
sxctl -> specialix_sxctl - shouldn't this be just a rename?
rioctl -> specialix_rioctl - shouldn't this be just a rename?Maybe just rename it, yeah.
Quoted 1 line
no
/dev/pilot? :)
No, that doesn't work reliably, you never know which port is the right one. It can not be done with udev today, only with a specific vendor/device list match.
Quoted 4 lines
permissions
dri/card* 666 ???!!!
fuse 666 ???!!!
No idea.
Quoted 1 line
bus/usb/* 644 instead of 664?
We intentionally don't do group assignment here, so we can change the permission if you need it.
Quoted 1 line
tty 620 instead of 600? your ttys are writable?
No idea. Just change it?
Quoted 6 lines
groups
no cdrom group?
no scanner group?
no tape group?
no dialout group? - this may be Debianish, but we rely on it
We do not want to put users in any such groups, but use dynamically assigned and managed ACLs for it. We use groups only for easy setups of system daemons like "video", for a streaming server and such. These groups do not make much sense for Fedora or SUSE, and you may want to put them in your own rules, in cases we don't find a common solution.
Quoted 1 line
no audio group?
This group is used in alsa rules.
Quoted 1 line
ppdev devices not in the lp group?
Sounds like they should.
Quoted 1 line
nvram in group kmem not nvram?
No idea what's "right" here.
I changed some things and pushed it out to git.
Care to check the list again, and collect the remaining things for the next step? Then we can check with Harald what we can remove or change?
Thanks for doing this, looking forward to a more unified setup!
Thanks,
Kay
Quoted 2 lines · Kay Sievers
Quoted 1 line
tty 620 instead of 600? your ttys are writable?
No idea. Just change it?
It depends if you like write(1) and wall(1) to work by default or not. I do.
Signature · 2 lines
ciao, Marco
Quoted 7 lines · Kay Sievers
Quoted 3 lines · Scott James Remnant
additionally, we place these in the "audio" group
SUBSYSTEM="rtc", GROUP="audio"
Hmm, that sounds like a really weird workaround of some audio problem. Is this really what we want. :)
Only to know... why rtc in "audio" group?
Quoted 4 lines
Quoted 2 lines
ramdisk -> ram0 js* -> input/js* - aren't these different kernel drivers?I have no idea. Maybe remove them? Harald?
ramdisk -> ram0 --> link is on devices.txt
js -> input/js --> probably is wrong. js and input/js are from
different drivers
Quoted 1 line
Quoted 1 line
ftape -> qft0
devices.txt
Quoted 3 lines
Quoted 3 lines
permissions
dri/card* 666 ???!!!
I think this is overwrited by xorg.conf setting i don't have any rule changing this permission and ther permissions here are 660:
crw-rw---- 1 root video 226, 0 2008-12-20 03:33 /dev/dri/card0
I guess 660 is the default of Xorg without an Mode directive in DRI section in xorg.conf. The "video" group here is from one of few slackware custom rules. (maybe another one that can vanishes in the air?)
Quoted 3 lines
Quoted 1 line
tty 620 instead of 600? your ttys are writable?
No idea. Just change it?
good to use "wall" and "write".
Quoted 4 lines
Quoted 4 lines
groups
no dialout group? - this may be Debianish, but we rely on it
nvram in group kmem not nvram?
Hmmmm... no dialout and no nvram group here.
nvram really needs an exclusive group?
Quoted 1 line
Thanks for doing this, lookingm forward to a more unified setup!
Closer and closer -:)
Piter PUNK
Quoted 7 lines · On Sat, 20 Dec 2008 06:12:52 -0200 Piter PUNK <[email protected]> wrote:
Quoted 3 lines
Quoted 3 lines
permissions
dri/card* 666 ???!!!
I think this is overwrited by xorg.conf setting i don't have any rule changing this permission and ther permissions here are 660:
Quoted 6 lines
crw-rw---- 1 root video 226, 0 2008-12-20 03:33
/dev/dri/card0I guess 660 is the default of Xorg without an Mode directive in DRI section in xorg.conf. The "video" group here is from one of few slackware custom rules. (maybe another one that can vanishes in the air?)
Yes, at least one other distribution mentioned a "video" group, so maybe that is a candidate for upstream :)
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
no dialout group? - this may be Debianish, but we rely on
it nvram in group kmem not nvram?Hmmmm... no dialout and no nvram group here.
nvram really needs an exclusive group?
We use uucp in lieu of dialout iirc. Ultimately though, this is easy enough to work around as long as distributions know what the upstream default is *and* that default doesn't change...
Re nvram group, I don't see why it shouldn't be root or kmem - is there a legitimate reason why a normal user should have write access to /dev/nvram?
-RW
Quoted 1 line · Piter PUNK
Only to know... why rtc in "audio" group?
Because it was needed by mplayer and it's a good approximation of users with local console access.
Quoted 3 lines
Re nvram group, I don't see why it shouldn't be root or kmem - is there a legitimate reason why a normal user should have write access to
/dev/nvram?
I remember some thinkpad-specific application, for a start.
Signature · 2 lines
ciao, Marco
Quoted 11 lines · Piter PUNK
Quoted 6 lines · Kay Sievers
Quoted 3 lines · Scott James Remnant
permissions
dri/card* 666 ???!!!
I think this is overwrited by xorg.conf setting i don't have any rule changing this permission and ther permissions here are 660:
Quoted 6 lines
crw-rw---- 1 root video 226, 0 2008-12-20 03:33
/dev/dri/card0I guess 660 is the default of Xorg without an Mode directive in DRI section in xorg.conf. The "video" group here is from one of few slackware custom rules. (maybe another one that can vanishes in the air?)
It's actually libdrm that creates this node on behalf of Xorg. However, newer libdrm releases can be built with --enable-udev so that they just wait for the node to show up from udev and don't change the mode/owner at all. If that configuration is not used or the node doesn't show up from udev, the default in libdrm is root:root 660.
--
Dan
Quoted 6 lines · Marco d'Itri
Quoted 2 lines · Kay Sievers
Quoted 1 line
tty 620 instead of 600? your ttys are writable?
No idea. Just change it?
It depends if you like write(1) and wall(1) to work by default or not. I do.
Doesn't wall use /dev/pts*?
Kay
Quoted 5 lines · Marco d'Itri
Quoted 1 line · Piter PUNK
Only to know... why rtc in "audio" group?
Because it was needed by mplayer and it's a good approximation of users with local console access.
We do want to "approximate" local console access. There is infrastructure in place today that does that properly. If that's the only reason, we should not add it to the default rules.
Quoted 4 lines
Quoted 3 lines
Re nvram group, I don't see why it shouldn't be root or kmem - is there a legitimate reason why a normal user should have write access to
/dev/nvram?I remember some thinkpad-specific application, for a start.
That was before the proper kernel drivers, right?
Thanks,
Kay
Quoted 4 lines · Kay Sievers
I changed some things and pushed it out to git.
Care to check the list again, and collect the remaining things for the next step? Then we can check with Harald what we can remove or change?
I pushed out more stuff. Here is what I have left from your list, what we should decide to do with. Care to check, if anything else is missing?
# is it /devsr0 or /dev/sdc0? SUBSYSTEM="block", KERNEL="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%
# rtc in group "audio"? SUBSYSTEM="rtc", GROUP="audio"
# is this a locally exploitable, or only a possibly firewire connected remote machine? raw1394 GROUP="video"
# which ones do we need, not need? X0R -> null ramdisk -> ram0 ram -> ram1 lirc -> lirc0 vbi -> vbi0 radio -> radio0 video -> video0 fb -> fb0 ftape -> qft0 sbpcd -> sbpcd0 xpram* -> slram*
# group nvram needed? nvram GROUP="nvram"
# what are the right permissions? fuse GROUP="666" tty[0-9]* GROUP="600"
Thanks,
Kay
Quoted 5 lines · Kay Sievers
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
tty 620 instead of 600? your ttys are writable?
No idea. Just change it?
It depends if you like write(1) and wall(1) to work by default or not. I do.
Doesn't wall use
/dev/pts*?
Not if you are using the system console.
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Re nvram group, I don't see why it shouldn't be root or kmem - is there a legitimate reason why a normal user should have write access to
/dev/nvram?I remember some thinkpad-specific application, for a start.
That was before the proper kernel drivers, right?
Not sure.
Signature · 2 lines
ciao, Marco
Quoted 7 lines · Marco d'Itri
Quoted 5 lines · Kay Sievers
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
tty 620 instead of 600? your ttys are writable?
No idea. Just change it?
It depends if you like write(1) and wall(1) to work by default or not. I do.
Doesn't wall use
/dev/pts*?Not if you are using the system console.
Ah, fine.
execve("/usr/bin/wall", ["wall"], [/* 57 vars */]) = 0
...
open("/dev/tty1", O_WRONLY|O_NONBLOCK) = 4 writev(4, ...
...
Thanks,
Kay
Quoted 3 lines · Kay Sievers
On Fri, Dec 19, 2008 at 17:03, Kay Sievers <[email protected]> wrote:
# is it /devsr0 or /dev/sdc0? SUBSYSTEM="block", KERNEL="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%
I think it's OK. From devices.txt:
---
The prefix /dev/sr (instead of /dev/scd) has been deprecated. ( ... )
(in recommended links)/dev/scd? sr? hard Alternate SCSI CD-ROM name
---
The recommendation is to have a hardlink here. But i think symlink is OK.
Quoted 2 lines
# rtc in group "audio"? SUBSYSTEM="rtc", GROUP="audio"
To me, this is still very bizarre.
Quoted 1 line
# which ones do we need, not need?
+ X0R -> null
+ ramdisk -> ram0
o ram -> ram1
x lirc -> lirc0
x vbi -> vbi0
+ radio -> radio0
x video -> video0
x fb -> fb0
+ ftape -> qft0
x sbpcd -> sbpcd0
o xpram* -> slram*
The ones with + are from devices.txt.
The links mark with x I thought they can still be there. Is common to point the /dev/foo symlink to the current /dev/fooN that's in use (usually the first one, foo0). If user don't wants these links he can always overwrite those links with custom rules in /etc/udev/rules.d.
I don't know about the ones I mark with o.
Quoted 6 lines
# group nvram needed? nvram GROUP="nvram"# what are the right permissions? fuse GROUP="666" tty[0-9]* GROUP="600"
I like tty with MODE="0620". But 600 isn't bad.
The udev rules shipped with fuse-2.7.4 have
MODE="0666" in there. Maybe isn't better to leave
this to fuse package?
Piter PUNK
Quoted 8 lines · Piter PUNK
Quoted 4 lines · Kay Sievers
On Fri, Dec 19, 2008 at 17:03, Kay Sievers <[email protected]> wrote:
# is it /devsr0 or /dev/sdc0? SUBSYSTEM="block", KERNEL="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%I think it's OK. From devices.txt:
Quoted 8 lines
---
The prefix/dev/sr(instead of/dev/scd) has been deprecated. ( ... )
(in recommended links)/dev/scd? sr? hard Alternate SCSI CD-ROM name
---The recommendation is to have a hardlink here. But i think symlink is OK.
Devices.txt is pretty much ummaintained. If there will never a scd* kernel name in the future, wich replaces the sr* nodes, then there would be no real point in changing the kernel name here, just to cope with an outdated document. :) We should ask the SCSI guys what they recommend, have in mind here.
Quoted 4 lines
Quoted 2 lines
# rtc in group "audio"? SUBSYSTEM="rtc", GROUP="audio"To me, this is still very bizarre.
Yeah, it seem like a hack to work around some issues. No normal user should be in the "audio" group in the first place, because you really don't want people logged in over ssh to listen to your microphone and anything like that.
Quoted 16 lines
Quoted 1 line
# which ones do we need, not need?+ X0R -> null
+ ramdisk -> ram0
o ram -> ram1
x lirc -> lirc0
x vbi -> vbi0
+ radio -> radio0
x video -> video0
x fb -> fb0
+ ftape -> qft0
x sbpcd -> sbpcd0
o xpram* -> slram*The ones with + are from devices.txt.
Quoted 8 lines
The links mark with x I thought they can still be there. Is common to point the
/dev/foosymlink to the current/dev/fooNthat's in use (usually the first one, foo0). If user don't wants these links he can always overwrite those links with custom rules in/etc/udev/rules.d.I don't know about the ones I mark with o.
The stuff we don't know about, we should probably remove and wait if anybody uses it. :)
Quoted 8 lines
Quoted 6 lines
# group nvram needed? nvram GROUP="nvram"# what are the right permissions? fuse GROUP="666" tty[0-9]* GROUP="600"I like tty with MODE="0620". But 600 isn't bad.
0620 sounds fine, if people use the "tty" group.
Quoted 3 lines
The udev rules shipped with fuse-2.7.4 have
MODE="0666" in there. Maybe isn't better to leave
this to fuse package?
Yeah, makes sense to leave that to the fuse tools.
Kay
Quoted 4 lines · Kay Sievers
# which ones do we need, not need? X0R -> null ramdisk -> ram0 ram -> ram1
Quoted 8 lines
lirc -> lirc0 vbi -> vbi0 radio -> radio0 video -> video0 fb -> fb0 ftape -> qft0 sbpcd -> sbpcd0 xpram* -> slram*
probably should be removed to identify crufty old software
Quoted 6 lines · Kay Sievers
Quoted 4 lines · Kay Sievers
I changed some things and pushed it out to git.
Care to check the list again, and collect the remaining things for the next step? Then we can check with Harald what we can remove or change?
Quoted 6 lines
I pushed out more stuff. Here is what I have left from your list, what we should decide to do with. Care to check, if anything else is missing?
# is it /devsr0 or /dev/sdc0? SUBSYSTEM="block", KERNEL="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%
scd0, because as stated in:
devices.txt: "The prefix /dev/sr (instead of /dev/scd) has been deprecated."
Quoted 3 lines
# rtc in group "audio"? SUBSYSTEM="rtc", GROUP="audio"
hmm, we still have no audio group and rtc has nothing to do with audio at all.
Quoted 2 lines
# group nvram needed? nvram GROUP="nvram"
We have no nvram group and nobody complained about it in years :)
Quoted 3 lines
# what are the right permissions? fuse GROUP="666"
MODE66 should be ok. It is a user space file system anybody should be able to use.
Quoted 1 line
tty[0-9]* GROUP="600"
with MODE00, GROUP=tty would make no sense at all.
Quoted 3 lines
Thanks,
Kay
Quoted 6 lines · Kay Sievers
Quoted 6 lines
scd/sr
while the kernel still calls them sr, that prefix is deprecated. You symlink the new name to the old one, we do it the other way around to make it clearer:
Quoted 9 lines
Quoted 1 line
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%We do not want to change kernel names unless absolutely needed, especially for block devices we don't want to do that.
Where does the "deprecated prefix" information comes from? We should check with the kernel SCSI maintainers, and then do this, if it's the right thing.
We set this up as devices.txt says to, with the name as the non-deprecated one.
Quoted 10 lines
Quoted 6 lines
rtc
our rtc rules are more careful about only symlinking the CMOS to
/dev/rtc:SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc"Sounds fine if we do not want that for other drivers? It's only compatibility for old x86 behavior?
As far as I know, I talked with the upstream about it for a while before adding the rule.
Quoted 7 lines
Quoted 3 lines
additionally, we place these in the "audio" group
SUBSYSTEM=="rtc", GROUP="audio"Hmm, that sounds like a really weird workaround of some audio problem. Is this really what we want. :)
Actually, drop this one. We don't want it anymore.
Quoted 5 lines
Quoted 4 lines
raw1394
This should be in the "disk" group, not the "video" group; it can be used to execute code as root
Quoted 8 lines
It may not belong into be in the "video" group, but you definitely also don't want to put anybody in the "disk" group to access it, it's almost the same as being root. We can leave it as root, if we need to change it for security measures.
You can not execute code on the host, only on a device, which may be another box connected over firewire, right?
Loopback cable? This is something our security guy and kernel maintainer (who is the upstream maintainer of the old firewire system) felt strongly about -- obviously new firewire stack is much better anyway.
Quoted 9 lines
Quoted 8 lines
you also don't rename some devices, and thus disagree
KERNEL=="controlC[0-9]*", NAME="snd/%k" KERNEL=="hwC[D0-9]*", NAME="snd/%k" KERNEL=="midiC[D0-9]*", NAME="snd/%k" KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k" KERNEL=="seq", NAME="snd/%k" KERNEL=="timer", NAME="snd/%k"
Quoted 3 lines
That's in packages/40-alsa.rules. We do not carry it in the default udev rules, but in the alsa package.
These aren't installed by default, right? If we're all using the same rules, is there any reason not to?
Quoted 9 lines
Quoted 6 lines
symlinks
you have lots of extra symlinks, any particular reason? are you paid by the symlink? :p
X0R -> null ??!! WTFIt's in devices.txt. :) Harald wanted it. :)
I'm ok with it if it's in devices.txt :p
Quoted 6 lines
Quoted 3 lines
vbi -> vbi0 radio -> radio0 video -> video0That is needed for some old tools. People have complained.
We've not had these, and nobody complains too loudly ;) I want to avoid adding legacy symlinks to our config if I can help it, because people then will complain if they go away again later :p
Quoted 6 lines
Quoted 1 line
no
/dev/pilot? :)No, that doesn't work reliably, you never know which port is the right one. It can not be done with udev today, only with a specific vendor/device list match.
See vbi, radio, video, etc. above :p you can't have them and complain about this ;) I'd rather have none of them, and leave legacy/deprecated symlinks to distro-specific rules.
Quoted 4 lines
Quoted 1 line
tty 620 instead of 600? your ttys are writable?
No idea. Just change it?
wall/write related. I'm happy to change to your default.
Quoted 7 lines
Quoted 6 lines
groups
no cdrom group?
no scanner group?
no tape group?
no dialout group? - this may be Debianish, but we rely on it
Quoted 6 lines
We do not want to put users in any such groups, but use dynamically assigned and managed ACLs for it. We use groups only for easy setups of system daemons like "video", for a streaming server and such. These groups do not make much sense for Fedora or SUSE, and you may want to put them in your own rules, in cases we don't find a common solution.
Agree, we can handle these in our own rules.
Scott
Signature · 2 lines
Scott James Remnant [email protected]
Quoted 3 lines · Kay Sievers
# rtc in group "audio"? SUBSYSTEM="rtc", GROUP="audio"
Could be because MPlayer tried to access the RTC.
% mplayer -rtc /usr/share/sounds/KDE-Sys-App-Positive.ogg
...
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
...
That '-rtc' was the default at some time.
Regards,
Bernhard
Quoted 1 line · Bernhard Walle
Could be because MPlayer tried to access the RTC.
Yes, at least for Debian I think this was the main reason.
Signature · 2 lines
ciao, Marco
Quoted 14 lines · Harald Hoyer
Quoted 4 lines · Kay Sievers
# which ones do we need, not need? X0R -> null ramdisk -> ram0 ram -> ram1Quoted 8 lines
lirc -> lirc0 vbi -> vbi0 radio -> radio0 video -> video0 fb -> fb0 ftape -> qft0 sbpcd -> sbpcd0 xpram* -> slram*
Quoted 1 line
probably should be removed to identify crufty old software
I removed tham all. :)
Thanks,
Kay
Quoted 2 lines · Kay Sievers
I removed tham all. :)
push ;)
Then I'll run through the package again, and see what else falls out. Will you be able to do a 136 release to get us in sync? That way I can just package that.
Scott
Signature · 2 lines
Scott James Remnant [email protected]
Quoted 13 lines · Harald Hoyer
Quoted 12 lines · Kay Sievers
Quoted 5 lines · Kay Sievers
I changed some things and pushed it out to git.
Care to check the list again, and collect the remaining things for the next step? Then we can check with Harald what we can remove or change?
I pushed out more stuff. Here is what I have left from your list, what we should decide to do with. Care to check, if anything else is missing?
Quoted 5 lines
Quoted 2 lines
# is it /devsr0 or /dev/sdc0? SUBSYSTEM="block", KERNEL="sr[0-9]*", NAME="scd%n", SYMLINK+="sr%scd0, because as stated in:
devices.txt: "The prefix/dev/sr(instead of/dev/scd) has been deprecated."
That is a Linux 2.4 document. I'll go ask the SCSI guys, if there is never a sdc* kernel device again, the document is just wrong, not the rules. :)
Thanks,
Kay
Quoted 9 lines · Scott James Remnant
Quoted 2 lines · Kay Sievers
I removed tham all. :)
push ;)
Then I'll run through the package again, and see what else falls out. Will you be able to do a 136 release to get us in sync? That way I can just package that.
Sure, no problem. Let's get through the first round, then we do a new release.
Kay
Quoted 4 lines · Marco d'Itri
Quoted 1 line · Bernhard Walle
Could be because MPlayer tried to access the RTC.
Yes, at least for Debian I think this was the main reason.
Yeah, likely the reason. But people it's a weird hack, and should that on their box, and not the default rules.
Kay
Quoted 7 lines · Scott James Remnant
Quoted 5 lines · Kay Sievers
Quoted 5 lines
rtc
our rtc rules are more careful about only symlinking the CMOS to
/dev/rtc:
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
SUBSYSTEM="rtc", DRIVERS="rtc_cmos", SYMLINK+="rtc"Sounds fine if we do not want that for other drivers? It's only compatibility for old x86 behavior?
As far as I know, I talked with the upstream about it for a while before adding the rule.
Fine. I've added this already.
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
raw1394
This should be in the "disk" group, not the "video" group; it can be used to execute code as root
It may not belong into be in the "video" group, but you definitely also don't want to put anybody in the "disk" group to access it, it's almost the same as being root. We can leave it as root, if we need to change it for security measures.
Quoted 7 lines
Quoted 3 lines
You can not execute code on the host, only on a device, which may be another box connected over firewire, right?
Loopback cable? This is something our security guy and kernel maintainer (who is the upstream maintainer of the old firewire system) felt strongly about -- obviously new firewire stack is much better anyway.
It's hard to find a box with a single firewire controller. :) Removed the group, it's root now.
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
you also don't rename some devices, and thus disagree
KERNEL="controlC[0-9]*", NAME="snd/%k" KERNEL="hwC[D0-9]*", NAME="snd/%k" KERNEL="midiC[D0-9]*", NAME="snd/%k" KERNEL="pcmC[D0-9cp]*", NAME="snd/%k" KERNEL="seq", NAME="snd/%k" KERNEL="timer", NAME="snd/%k"
Quoted 5 lines
Quoted 3 lines
That's in packages/40-alsa.rules. We do not carry it in the default udev rules, but in the alsa package.
These aren't installed by default, right? If we're all using the same rules, is there any reason not to?
There are many other alsa rules for loading "soundfonts" and such, so we moved these ones to the alsa package too.
Quoted 10 lines
Quoted 9 lines
Quoted 6 lines
symlinks
you have lots of extra symlinks, any particular reason? are you paid by the symlink? :p
X0R -> null ??!! WTFIt's in devices.txt. :) Harald wanted it. :)
I'm ok with it if it's in devices.txt :p
It's gone. Forget devices.txt, nobody maintains this thing anymore.
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
vbi -> vbi0 radio -> radio0 video -> video0That is needed for some old tools. People have complained.
We've not had these, and nobody complains too loudly ;) I want to avoid adding legacy symlinks to our config if I can help it, because people then will complain if they go away again later :p
Ok, we will see. They are all gone now. I agree, in most cases the tools should be changed, or people should use their own rules.
Quoted 9 lines
Quoted 6 lines
Quoted 1 line
no
/dev/pilot? :)No, that doesn't work reliably, you never know which port is the right one. It can not be done with udev today, only with a specific vendor/device list match.
See vbi, radio, video, etc. above :p you can't have them and complain about this ;) I'd rather have none of them, and leave legacy/deprecated symlinks to distro-specific rules.
Yeah, but vbi, radio, video was not wrong, did never point to a device which actually is not a vbi, radio, video device. For half of the devices, /dev/pilot pointed to a device which did not give access to the pilot. :)
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
tty 620 instead of 600? your ttys are writable?
No idea. Just change it?
wall/write related. I'm happy to change to your default.
Fine.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
groups
no cdrom group?
no scanner group?
no tape group?
no dialout group? - this may be Debianish, but we rely on it
Quoted 7 lines
Quoted 6 lines
We do not want to put users in any such groups, but use dynamically assigned and managed ACLs for it. We use groups only for easy setups of system daemons like "video", for a streaming server and such. These groups do not make much sense for Fedora or SUSE, and you may want to put them in your own rules, in cases we don't find a common solution.
Agree, we can handle these in our own rules.
Cool.
Thanks,
Kay
Quoted 8 lines · Kay Sievers
Quoted 5 lines
names
you rename some devices and disagree with devices.txt
rawctl -> raw/rawctlThe tools use that, if I remember. Someone maintaining the tools should tell, devices.txt is pretty unreliable sometimes.
The upstream raw(8) command supports /dev/rawctl and also /dev/raw/rawctl. I think it makes more sense to use raw/rawctl when you have all your raw devices in raw/ subdirectory (e.g. /dev/raw/raw<N>).
Karel
Signature · 1 line
Karel Zak <[email protected]>
Quoted 5 lines · Karel Zak
Quoted 4 lines · Kay Sievers
Quoted 4 lines
names
you rename some devices and disagree with devices.txt
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
rawctl -> raw/rawctlThe tools use that, if I remember. Someone maintaining the tools should tell, devices.txt is pretty unreliable sometimes.
The upstream raw(8) command supports
/dev/rawctland also/dev/raw/rawctl. I think it makes more sense to use raw/rawctl when you have all your raw devices in raw/ subdirectory (e.g. /dev/raw/raw<N>).
The raw tool looks for /dev/rawctl first and the fallback to /dev/raw/rawctl is named DEVFS_*. Should we turn that order around and remove the devfs notion from the raw tool and let udev create a dev/raw/rawctl node?
Thanks,
Kay
Quoted 11 lines · Kay Sievers
Quoted 10 lines · Karel Zak
Quoted 8 lines · Kay Sievers
Quoted 5 lines
names
you rename some devices and disagree with devices.txt
rawctl -> raw/rawctlThe tools use that, if I remember. Someone maintaining the tools should tell, devices.txt is pretty unreliable sometimes.
Quoted 8 lines
Quoted 3 lines
The upstream raw(8) command supports
/dev/rawctland also/dev/raw/rawctl. I think it makes more sense to use raw/rawctl when you have all your raw devices in raw/ subdirectory (e.g. /dev/raw/raw<N>).The raw tool looks for
/dev/rawctlfirst and the fallback to/dev/raw/rawctlis named DEVFS_*. Should we turn that order around and remove the devfs notion from the raw tool and let udev create a dev/raw/rawctl node?
Yeah. Fixed, committed and pushed.
$ strace -e open ./raw
open("/dev/raw/rawctl", O_RDWR) = -1 ENOENT (No such file or directory)
open("/dev/rawctl", O_RDWR) = -1 ENOENT (No such file or directory) I have also removed the #ifdef OLD_RAW_DEVS (/dev/raw<N>) junk.
BTW, it would be nice to refresh devices.txt according to your latest changes in udev.
Karel
Signature · 1 line
Karel Zak <[email protected]>
Quoted 21 lines · Karel Zak
Quoted 11 lines · Kay Sievers
Quoted 10 lines · Karel Zak
Quoted 8 lines · Kay Sievers
Quoted 5 lines
names
you rename some devices and disagree with devices.txt
rawctl -> raw/rawctlThe tools use that, if I remember. Someone maintaining the tools should tell, devices.txt is pretty unreliable sometimes.
Quoted 8 lines
Quoted 3 lines
The upstream raw(8) command supports
/dev/rawctland also/dev/raw/rawctl. I think it makes more sense to use raw/rawctl when you have all your raw devices in raw/ subdirectory (e.g. /dev/raw/raw<N>).The raw tool looks for
/dev/rawctlfirst and the fallback to/dev/raw/rawctlis named DEVFS_*. Should we turn that order around and remove the devfs notion from the raw tool and let udev create a dev/raw/rawctl node?
Quoted 7 lines
Yeah. Fixed, committed and pushed.
$ strace -e open ./raw open("/dev/raw/rawctl", O_RDWR) = -1 ENOENT (No such file or directory) open("/dev/rawctl", O_RDWR) = -1 ENOENT (No such file or directory)I have also removed the #ifdef
OLD_RAW_DEVS(/dev/raw<N>) junk.
Pushed out /dev/raw/rawctl.
Quoted 2 lines
BTW, it would be nice to refresh devices.txt according to your latest changes in udev.
Yeah, we should do that, also the /dev/scd* stuff should be removed there.
Thanks,
Kay