Re: [PATCH 0/8] introduce dynamic device creation/removal
From: Alan Cox
Date: Mon Mar 02 2015 - 09:18:36 EST
> > This is a long term plan, of course, but I'd like to see sysfs functions go away
> > in a year or so. What do you think?
>
> hoo boy. Creating a /dev node and doing ioctls on it is really old
> school. So old school that I've forgotten why we don't do it any more.
>
> Hopefully Alan can recall the thinking?
Gee.. pass me the walking stick and the pipe !
The problem we used to have with it was re-use of /dev nodes and
permissions. For example if I create a ZRAM instance and then we crash
and my /dev is persistent then next boot I can potentially be opening
that left over node (or it may even be forgotten), which has old and
stale permissions on it.
With devtmpfs it's a bit easier and saner.
The old abuser of this was the old PCMCIA layer which has more exciting
versions of the problem as it used /tmp for some nodes.
Switching to sysfs probably fits better but the problem is the generic
one of revoking access rights to an object.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/