[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: stack protection



Russell Coker <russell@coker.com.au> writes:

> On Fri, 22 Aug 2003 11:35, Goswin von Brederlow wrote:
> > > A paper on udev was presented at OLS this year, at the URL below
> > > you can find a copy in PDF format.  Basically it is a way of
> > > providing some of the features of devfs but based around using
> > > hotplug to create device nodes using mknod under a regular
> > > directory.  So there is no mountable /dev.
> >
> > Which means you need certain userspace tools for it to work at all
> > and if they fail you are screwed. Also how do you boot without a
> > /dev? You need a dummy dev containing any possible root device.
> >
> > Now that you mention the mounting /dev going away this realy
> > sucks.
> 
> MOUNTING /dev is going away.  So you will have /dev be a regular
> directory on a regular file system with device nodes in it.  For
> booting things will work the same way that they worked when Linux
> was first released.

Which means you need about 1000000 device nodes so you can boot of any
of the 65536 disks you could have connected?

Or can you get around till udev starts with a very few nodes with
fixed major/minor?

> > Doesn't sysfs basically do most of what devfs. Doesn't it know about
> > all devices?
> 
> I believe that udev uses sysfs among other things.

I just ment that instead of devfs knowing about all devices now sysfs
knows about all devices. So theoretically nothing is gained.
Practically sysfs might be better implemented.

Also could sysfs be made to provide a minimal /dev with at least nodes
for the root device and consoles?

> On Fri, 22 Aug 2003 11:48, Brian May wrote:
> > One of the concepts behind devfs is that we could move away from
> > the current mapping of /dev/device --> {major,minor} --> kernel
> > driver system, and instead have the /dev/device map straight to
> > the driver (or something like that, I am just reciting this from
> > memory).
> 
> Yes, that would have been the eventual aim.  devfs=only was a step
> in that direction.
> 
> > Have they abandoned this approach?
> 
> It seems so.
> 
> > > > http://archive.linuxsymposium.org/ols2003/Proceedings/
> > > >
> > > > As for why it's better than udev.  There have been bugs in
> > > > devfs in the past related to race conditions.  Also devfs
> > > > requires that the kernel knows about all the device nodes,
> > > > whether this is a bug or an excellent feature is a matter of
> > > > opinion.
> >
> > Instead of the kernel knowing about device nodes, it needs to know
> > about the {major,minor} mappings.
> 
> Correct.  Therefore we need 32bit device numbers instead.

I wonder if it wouldn't be possible to have the devfs
register/unregister calls for device nodes happen in the parts f the
kernel handling major/minor registration instead of in each individual
driver. How do major/minor pairs get registered with sysfs?

MfG
        Goswin



Reply to: