lkml.org 
[lkml]   [2009]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to tell whether a struct file is held by a process?
On Fri, 22 May 2009, Alan Cox wrote:

> > And just how does initialization and enumeration mess up
> > virtualization?
>
> It means that the bus scanning occurs out of control of the virtualised
> environment which might want to control what occurs

With USB this isn't much of an issue. There are almost no
device-specific parameters affecting enumeration and none affecting
initialization -- understandably, since before initialization the
kernel doesn't know what kind of device it's dealing with.

> > Anyway, enumeration isn't the problem. The real problem has two parts:
> >
> > Automatic probing and binding of kernel drivers, including
> > selection and installation of a configuration (this really
> > _does_ mess up virtualization).
>
> If enumeration isn't automatic (or even more so if binding isn't always
> automatic) then the problem doesn't occur.

I disagree. For one thing, probing of kernel drivers doesn't occur
during enumeration. So we could have automatic enumeration without
automatic probing, and there would be no problem. For another, even if
enumeration were the direct cause of some problem, it would still
cause that same problem whenever it occurred, whether automatically or
not.

> > The second part can be solved (among cooperating processes) by use of
> > port-lock files, with no kernel involvement. The first part does
> > require a kernel interface of some sort, but it wouldn't have to be
> > complicated. The mere fact that a port-lock file was open could be
> > enough to prevent automatic configuration, probing, and binding.
>
> Given the layout of devices can change fairly arbitarily would the
> ability to claim specific device identifiers via libusb do the job any
> better.
>
> ie would it be better to expose an interface via libusb that was
> essentially
>
> reserve_for_userspace(vendorid, devid);

That's a good question. I'll defer to the interested parties.
Kyle and Pantelis, what do you think?

Alan Stern



\
 
 \ /
  Last update: 2009-05-22 18:07    [W:0.706 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site