"mdev: remove undocumented subsystem/devname matching hack" disaster.

Denys Vlasenko vda.linux at googlemail.com
Mon Jan 28 11:42:22 UTC 2013


On Fri, Jan 25, 2013 at 11:11 AM, Piotr Karbowski
<piotr.karbowski at gmail.com> wrote:
> Along 1.21.0 release the mdev become pretty much unusable,

The x.0 release is considered unstable exactly for the reason
that some breakage is expected :(

> the commit
> bf99807657eac6f0d4fc593b3a83d34338c62293 break some rules, for example alsa,
> the rules (the same as in current mdev_fat.conf):
>
>         pcm.*           root:audio 660 =snd/
>         control.*       root:audio 660 =snd/
>         midi.*          root:audio 660 =snd/
>         seq             root:audio 660 =snd/
>         timer           root:audio 660 =snd/
>
> And I am using this tiny snippet to coldplug automaticly all the modules:
> find /sys -name 'modalias' -type f -exec cat '{}' + | sort -u | xargs
> modprobe -b -a 2>/dev/null
>
> After its done, the snd-hda-intel is loaded, but /dev/snd/control* etc have
> wrong permissions, root:root instead of root:audio, after I re-run 'mdev -s'
> the permissions are fixed.

This is not expected to happen :(

Please create empty /dev/mdev.log, redo this experiment,
and post the resulting mdev.log.

> Next issue is removing support of rules like "-net/.*", now it does not
> execute script whenever new interface arrive, thus I need to either create
> hotplug-agent-wrapper script to check for SUBSYSTEM=net to run it and skip
> mdev or add rule like '.* root:root 660 */opt/mdev/helpers/catch-all' at the
> very end of mdev.conf

In my opinion special-casing subsystem check (by allowing
SYBSYSTEM/DEVNAME) is
(a) collides with device names with slashes, and
(b) why should subsystem be special, why other environment
variables don't have means to be matched against?

Maybe we need a more generic syntax.
How about this?

[VAR1=REGEX1;[VAR2=REGEX2;]...]DEVNAME ....

Then you would use "SUBSYSTEM=net;.* ..." rule

-- 
vda


More information about the busybox mailing list