Mailing List Archive

Re: PUBLIC CHALLENGE: (was RE: devfs again, (was RE: USB device a lloc
Horst von Brand wrote:
> The standard interface is that permissions stay put, even after reboots.
use the config file. we have config files for mounts, we have config files for
modules, etc.
> Reasons against devfs:
>
> - Permanent attributes are kludged on
as are attributes on a variety of items. dynamically changed attribs can be
done with scripting, daemons; userland or kernel. this is a 1:1 debate point.
> - Breaks filesystem semantics in several ways, makes it very hard to check
> ramifications
how? should we throw away /proc and other magic filesystems because they
aren't true blocks of data on physical disc media?
> - Impacts system administration, making device managing a lot less Unixy
how? i've been using devfs for well over a year and i find managing devices
much easier and less time consuming. "unixy" needs to keep pace with today's
technology needs. devfs is certainly a step in that direction.
> - Impacts _every_ single driver in the kernel, even if it isn't used
there's a good lot that impacts every single driver, memory routines come to
mind. function naming semantics, etc.
> - What can be done with devfs can be done without it. Granted, it is less
> convenient. But I add/remove devices from my machines perhaps once a
> month, so that doesn't cut it for me.
i have pcmcia and hotswap items everywhere. i transfer hardware *frequently*.
devfs makes things easier. with the amount of admin work i do, convenient
administration is terribly wonderful.
> Reasons for devfs:
>
> - Makes handling hot-plug easier, but marginally so
> - Unclutters /dev
makes handling devices exactly correct. /dev/sda could be any of disc.
/dev/sd/c0b0t0u0 is precisely one disc.
an uncluttered /dev/ is immensely make-me-happy helpful. i have several
systems with LARGE process tables that do a lot of work in /dev. having a
dynamic /dev is considerably helpful in keeping the file op load down.
> Also: It is extra code, has to be maintained and updated, and has to be
naturally...everything more is ... more. it's been splendidly maintained and
updated for the last two years since it's inception.
> accounted for in new driver developments. It _will_ add new bugs, even new
> classes of bugs. This doesn't come for free.
in my experience, devfs has uncovered existing bugs in other software and fixed
such things as tty ownership and permissions. remember all the dribble about
*xvt and tty permissions?
> Weighting the above, the answer for me is clearly "no".
then you may certainly answer "no" when you scroll past it in your config
options for building the kernel. i will clearly choose "yes" just like i do
for every other option i need in my kernel.
should we remove all portions of the kernel with SMP in it because you may not
have an SMP machine?
this is a silly debate. would you also argue that pcmcia shouldn't go in the
kernel because you may not have pcmcia?
-d
--
This is Linux Country. On a quiet night, you can hear Windows NT reboot!
Do you remember how to -think- ? Do you remember how to experiment? Linux
__ is an operating system that brings back the fun and adventure in computing.
\/ for linux-kernel: please read linux/Documentation/* before posting problems
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: PUBLIC CHALLENGE: (was RE: devfs again, (was RE: USB device a lloc [ In reply to ]
Horst von Brand wrote:
> Very true. The easiest way to solve _any_ problem is to have somebody else
> do the solving.
>
> Look, the problems with devfs are of two kinds:
> - It really can't solve the problems it is supposed to solve
> - The implementation might not be up to snuff
it solves my device naming and it is quite up to snuff. for the last X months,
the largest changes in the devfs patch are syncing it with the current source
code of the kernel.
> I really don't know about the second point, I'd assume that that is fixed
> by now (it has been more than a year, isn't it?). If not, they can be
> solved by the horde of devfs adicts. No need to involve the kernel hackers
> in this.
it's been two years in the works. and issues are really trivial. i've used
devfs in production for just shy of a year now and none of my production
machines has ever suffered from an issue related to devfs. i have a singular
machine that sits on the shelf that i had a problem with an IDE tape drive a
long time ago and haven't had time to dust it off and solve the problem ..if
the problem even exists today.
> The first one is the real stumbling block, IMO: devfs tries to solve the
> (addmitedly very hard) problem of managing devices (which in turn are just
> proxies for the _data_ they contain/convey, which is what you really want
> to manage) by placing an automated naming system in between. This just
> might be one of the minor building blocks for a solution to the real
> problem (assuming the solution goes through "devices" with "names" that
> look like "files").
and it's doing one heck of a great job, and as i've purported before, it is a
step in the right direction. i'd rather take that step than let moss grow.
-d
--
This is Linux Country. On a quiet night, you can hear Windows NT reboot!
Do you remember how to -think- ? Do you remember how to experiment? Linux
__ is an operating system that brings back the fun and adventure in computing.
\/ for linux-kernel: please read linux/Documentation/* before posting problems
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Re: PUBLIC CHALLENGE: (was RE: devfs again, (was RE: USB device a lloc [ In reply to ]
Horst von Brand wrote:
> And it works for no devfs _without_ touching any /etc/rc.d files at
> all. Why do work when none is enough?
why make and run scripts when no work is needed
> OK, agree on a standard then. UUIDs work with IDE, SCSI, ... for disks. OK,
> done. Network doesn't need /dev entries. DOne too. Sound needs different
uuids work for non-removable media. if i change my zip cart, it'll have a different
uuid. uuid isn't an encompassing solution.
> Maybe. What is questioned is that it may very well not be the best solution
> in many cases, and isn't by far in the cases bandied around here.
so far, it is the only solution that has been accomplished other than bad mouthing
it because some people don't like it. if it isn't perfect we work on it. linux
isn't perfect but we improve it constantly. should we delete linux because it isn't
the best solution?
> "rm /dev/hda5" doesn't work; neither does "chmod g-w /dev/fd0".
# ls -l /dev/fd0
brw-rw---- 1 root root 2, 0 Dec 31 1969 /dev/fd0
# chgrp users /dev/fd0
# ls -l /dev/fd0
brw-rw---- 1 root users 2, 0 Dec 31 1969 /dev/fd0
$ dd if=/dev/zero of=/dev/fd0
649+0 records in
648+0 records out
# chmod g-w /dev/fd0
# ls -l /dev/fd0
brw-r----- 1 root users 2, 0 Dec 31 1969 /dev/fd0
$ dd if=/dev/zero of=/dev/fd0
dd: /dev/fd0: Permission denied
# rm /dev/fd0
# ls -l /dev/fd0
ls: /dev/fd0: No such file or directory
# mknod -m 660 /dev/fd0 b 2 0
# ls -l /dev/fd0
brw-rw---- 1 root root 2, 0 Oct 9 14:01 /dev/fd0
# dd if=/dev/zero of=/dev/fd0
109+0 records in
108+0 records out
seems like a fair lack of excitement here. or was it supposed to do something
strange?
# ls -l /dev/h*
brw------- 1 root root 3, 2 Oct 1 21:54 /dev/hda2
brw------- 1 root root 22, 0 Dec 31 1969 /dev/hdc
brw------- 1 root root 22, 64 Dec 31 1969 /dev/hdd
brw------- 1 root root 22, 65 Dec 31 1969 /dev/hdd1
# rm /dev/hdc
# ls -l /dev/h*
brw------- 1 root root 3, 2 Oct 1 21:54 /dev/hda2
brw------- 1 root root 22, 64 Dec 31 1969 /dev/hdd
brw------- 1 root root 22, 65 Dec 31 1969 /dev/hdd1
# mknod -m 600 /dev/hdc b 22 0
# ls -l /dev/h*
brw------- 1 root root 3, 2 Oct 1 21:54 /dev/hda2
brw------- 1 root root 22, 0 Oct 9 14:05 /dev/hdc
brw------- 1 root root 22, 64 Dec 31 1969 /dev/hdd
brw------- 1 root root 22, 65 Dec 31 1969 /dev/hdd1
hmmm. perhaps i'm missing something.
> OK, how many _different_ kinds of devices do you plug into it?
take a lab with lots of laptops, lots of portable things that plug into either
laptop or desktop, you know, disks, mice, modems, etc, multiply that by the number
of people walking around.
even that it happens for just one device for just one person in that office for just
a few times that day, that's why "hotswap" is so convenient.
should we have the NT version of pcmcia or the hotswap version?
> Again, how many _different_ kinds of devices will I be using simultaneously
> on it? What kind of iBook devices plug themselves in, just by themselves,
> and get instantly useable without any user intervention?
i take my favorite usb mouse with me because it's the only one i have with a wheel.
i plug it in and go, NO changes needed in the already running X system. i can
unplug it and use the glidepoint in the keyboard if i don't have my mouse with me.
i don't want to have to run scripts to reset everything every time i change
something.
it's called "user friendly" not "this is unix so it'll work but you have to do
everything before i'll let it work"
> > > - Impact on security: What if the permission handling machinery goes
> > > missing or breaks? What new kinds of attacks does this make possible?
> > > Ways to fix them?
what if update goes missing or breaks, what if what if what if. what if the cpu
goes missing or breaks.
that's as logical as saying what if the password file disappears so we shouldn't use
a password system.
> > Seems to fail safe to me, failure or non-use of permission handling
> > machinery would result in default permissions. These tend to be
> > _more_secure_ than modified permissions.
>
> All devices 000 by default? What is "paranoid secure permissions" for you
> might be "criminal insecurity" for the next guy.
that devfs is a bloated mess to you is a beautiful convenience for the next guy.
> > > - Impact on administration: "For Linux, unlike any other Unix system,
> > > devices are managed by...". This hinders people portability.
nothing has changed in the unix way i manage devices other than i spend less time
doing it.
> All of them handle them as files that have persistent permissions, AFAIK.
all of this talk about permissions and we skirt over the fact that tty permissions
change for every use. nothing persistent there, all managed dynamically and by
policy, by the devices accessing them.
> > > - Impact on software portability: What if this cool foo package needs to
> > > change permissions on the bar device? On installation? During operation?
>
> > It does so. Just expect a consistent set of permissions at boot time.
>
> Useless, if I need it at boot.
it is not beyond the intelligence of this community to design a persistent structure
available at boot time.
> > > - Impact on future developments: Say capability-enabled root-less Linux
> > > distributions. How will capabilities be handled for devices? Now there
> > > will have to be an all-powerful device manager... want to bet what
> > > crackers will start to try at after getting into your system?
capabilities aren't exactly centered in the scope of devfs. bringing up root-less
systems is a good point. without a single bit of media, i already have a working
/dev
> Capabilities can not be handled in user space. If they are, they are next
> to useless: The kernel won't be able to distinguish a faked capability
> handler from the real one, and the security you should get goes out the
> window. Same with permissions on devices: They have to be handled in the
> kernel, as they are way to important to be handled outside by insecure means.
policy can be dictated from userspace. not handling. same goes for permissions.
policy is handled by userland. save for policy set in /proc, the kernel doesn't
care what uid/gid/perms you place on a device, it only enforces them.
> > > Again, /dev might not scale well, but it is a non-problem. I have yet to
> > For you.
> And everybody else I've ever met.
have you had 200 active users on your system and found that you're out of ttys due
to the structure? you keep trying to say things are a moot point because you
haven't reached that limitation. other people have.
> > > see a machine with hundreds of devices. And the network around here, that
> > I have.
>
> Great! How is it handled? What percentage of the admin time goes into
> managing devices? 1%? 0.1%? Less? More? 10%? 20%?
how much is too much time? i don't think my shop policy should be dictated by you.
if i can shave 5 minutes off the workload of six employees per day, that's two and a
half hours per week. it is certainly of worth to me.
> > > is certainly made of hundreds of devices, isn't reconfigured willy-nilly.
> > Some need to be.
> Which ones? Why? How is that managed now? How will a simple naming scheme
> for devices make the work simpler? By how much?
in one word, a much higher level of accuracy being that the admins don't do it so
they don't make typos or assign wrong values.
i don't rely on m$ to assure me of security, neither do i rely on rpms to dictate
how things go on my network. if i counted all the exploits and vulnerabilities due
to poorly setup packages and policy dictated "for the mass" i could count dozens of
times when my network remained secure from exploitation and distributions madly
whipped up a patch.
in a parallel, we have dhcp. i used to use the argument of why we shouldn't use
dhcp because my scripts worked just dandy. when you're managing enterprise
networks, you DON'T have time to run things this way. luckily i stopped being
stubborn and learned better ways.
> > devfs solves so many more problems than "naming issues" that this isn't
> > even funny.
> WHAT problems, exactly, does devfs (which is just a naming scheme) solve?
ttys comes to mind.
> There is yet to be the "first set of dynamic devices" (USB), the discussion
> started precisely on how to handle them. If devfs really did solve all, the
> discussion would not even have started. That it did shows precisely that
> devfs does _not_ solve the issues involved.
it shows that the current implementation didn't match the requirements. i have no
doubt that the two could bring their heads together and make magic happen.
there is always version 1 of a concept. and invariable, version 2 and so on.
if we insist on never putting concepts into the kernel because they aren't perfect,
then we'll never get anywhere.
-d
--
This is Linux Country. On a quiet night, you can hear Windows NT reboot!
Do you remember how to -think- ? Do you remember how to experiment? Linux
__ is an operating system that brings back the fun and adventure in computing.
\/ for linux-kernel: please read linux/Documentation/* before posting problems
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/