mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Kyle Moffett <kyle@moffetthome.net>,
	Pantelis Koukousoulas <pktoss@gmail.com>,
	Kay Sievers <kay.sievers@vrfy.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: How to tell whether a struct file is held by a process?
Date: Fri, 22 May 2009 16:20:14 +0100	[thread overview]
Message-ID: <20090522162014.5caa0823@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0905221051350.3006-100000@iolanthe.rowland.org>

> I don't understand this comment.  By "probe" I assume you mean
> "initialize and enumerate", as opposed to calling various drivers'
> probe() routines -- let me know if this isn't what you meant.  If the
> kernel didn't initialize and enumerate devices by default, then when
> would they get initialized and enumerated?

When user space gets an event saying the bus itself exists and asks for
it to be scanned. The most obvious case where its currently broken is
partition tables on disks where you don't always want to read partition
tables automatically.

> 
> If your answer is "When requested by a user process", then I'll go on
> to ask: What about devices containing the root filesystem, the system 
> console, and so on?
> 
> 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

> 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.

> 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);


  reply	other threads:[~2009-05-22 15:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 16:57 Alan Stern
2009-05-21  9:52 ` Al Viro
2009-05-21 14:06   ` Alan Stern
2009-05-21 21:07     ` Kay Sievers
2009-05-21 21:27       ` Alan Stern
2009-05-22 13:30         ` Pantelis Koukousoulas
2009-05-22 13:38           ` Oliver Neukum
2009-05-22 13:43           ` Alan Cox
2009-05-22 13:52             ` Pantelis Koukousoulas
2009-05-22 14:12               ` Alan Cox
2009-05-22 14:29                 ` Pantelis Koukousoulas
2009-05-21 22:14       ` Alan Cox
2009-05-22  1:28         ` Kyle Moffett
2009-05-22  9:53           ` Alan Cox
2009-05-22 15:12             ` Alan Stern
2009-05-22 15:20               ` Alan Cox [this message]
2009-05-22 16:04                 ` Alan Stern
2009-05-22 16:23                   ` Pantelis Koukousoulas
2009-05-22 18:19                     ` Alan Stern
2009-05-22 15:21               ` Kay Sievers
2009-05-22 15:54                 ` Alan Stern
2009-05-22 18:24                   ` Kay Sievers
2009-05-22 18:48                     ` Pantelis Koukousoulas
2009-05-22 19:31                     ` Alan Stern
2009-05-22 21:54                       ` Kay Sievers
2009-05-22 22:07                         ` Alan Stern
2009-05-23 22:47                           ` Kay Sievers
2009-05-22  8:36         ` Oliver Neukum
2009-05-21 22:22     ` Alan Cox
2009-05-22 12:26     ` Oliver Neukum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090522162014.5caa0823@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=kay.sievers@vrfy.org \
    --cc=kyle@moffetthome.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pktoss@gmail.com \
    --cc=stern@rowland.harvard.edu \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®