Am Donnerstag, 24. Oktober 2002 00:24 schrieb Greg KH:
> On Thu, Oct 24, 2002 at 12:06:33AM +0200, Oliver Neukum wrote:
> > > > A model of one simple file to be opened per device _is_ simpler
> > > > than a number of files to control various settings.
> > > > Plus, how do you control permissions on that thing ?
> > >
> > > The driver controls the initial permissions.  I think it will be up to
> > > userspace to control them after that.
> >
> > You'll let a single device's settings have differing permissions
> > and ownership?
> > That is ... astonishing and complex.
> > (I am running out of fitting adjectives. I should look for my
> > dictionary.)
>
> If root, in it's infinite wisdom and power, wants to do such a thing,
> then hey, I'm not going to question that :)
>
> Seriously, this is a userspace issue.  The driver can set some initial
> values that it things is good, but in the end, root can change them to
> whatever it wants to, nothing new there.

Most definitely not true.
1. You make it impossible for drivers to implement exclusive open.
    This assumption is built into all V4L drivers.
2. You now have changes of permissions and ownership
    which are not atomic.

> Even so, open is not needed to be passed to the driver.  Yes, of course
> you need to do a open() call from userspace, and driverfs will get that
> and handle the reference counting properly for the device that is
> attached to that file.

You can do that for the module usage count. For reference counting
of a driver's internal data structures you cannot depend on driverfs.
The alternative is for the driver to treat any read/write through driverfs
as a combination of open+read/write+close.
There seems to be some misunderstanding. Do you want to prevent
disconnect() while read/write is running ?

> The goal is to not have drivers get driverfs (soon to be sysfs)
> implementation wrong.  The current driver interface to it is quite
> simple, and we want it to stay that way.

The usage recently seen on usb-devel was totally screwed, so I am
judging by recent experience.

        Regards
                Oliver



-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to