On Sat, Dec 03, 2005 at 01:43:48PM -0500, Jeff Garzik wrote:
>
> Userland isn't the same. IMO sysfs hackers have forgotten this.
No we have not.
> Anytime you change or remove sysfs attributes these days, you have the
> potential to break userland, which breaks one of the grand axioms of
> Linux. Everybody knows "the rules" when it comes to removing system
> calls, but forgets/ignores them when it comes to ioctls, sysfs
> attributes, and the like.
The _main_ reason of making sysfs contain "one value per file" was to
help mitigate the problems that proc has had in the past where file
format changes broke userspace programs.
Programs that rely on sysfs need to be able to safely handle the fact
that some attributes might or might not be there.
Now to be fair, yes, udev has had big problems with this in the past,
and kernel updates have broken udev. But that was because the bug was
MY fault in udev, not in the kernel. I'll take full responsibility for
that.
And in the future, the driver/class model changes we are going to be
doing (see http://lwn.net/Articles/162242/ for more details on this),
will be going to great lengths to prevent anything in userspace from
breaking.
So, to change your wording a bit, users of sysfs have forgotten how to
program defensively to handle changes that might happen in the future.
I know I'm guilty of this, and am working hard to not make the same
mistakes in the future.
thanks,
greg "still trying to delete devfs after 1 and 1/2 years notice" k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]