mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Kernel development list <linux-kernel@vger.kernel.org>,
	Pantelis Koukousoulas <pktoss@gmail.com>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: usbfs, claiming entire usb devices
Date: Sat, 9 May 2009 19:00:47 +0200	[thread overview]
Message-ID: <ac3eb2510905091000y4c7a6448uce799d00d500fffe@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0905081000140.3010-100000@iolanthe.rowland.org>

On Fri, May 8, 2009 at 16:06, Alan Stern <stern@rowland.harvard.edu> wrote:
> On Fri, 8 May 2009, Kay Sievers wrote:
>
>> You mentioned earlier, that you would need to match the holder of the
>> "lock" and the one that accesses the device?
>
> Yes.  That is, a process shouldn't be allowed to access a locked device
> unless that process is the lock holder.

You think the pid or the uid would make more sense?

>> Wouldn't it be sufficient already, if you can take a "lock" at the
>> specific port, that prevents the kernel to access the device when it
>> shows up?
>
> I don't know how the people requesting this feature would feel about
> that.  They seem to want to lock out other processes as well as locking
> out the kernel.

Might be useful, yeah. I could think of use cases where a specific uid
wants to lock a device, by holding the lock file open, and only the
same uid (could be a different pid) can claim the device from
userspace.

>> You thought of supporting a number of different users, with different
>> uids, or would that be a root-only action?
>
> A typical use case would be somebody running an emulator like QEMU.  In
> theory there could be multiple QEMU processes running concurrently,
> each owning a different set of ports.  The uids might be different or
> they might all be the same.
>
> Setting the lock permissions would be up to userspace.

Yeah, sounds fine.

Kay

  reply	other threads:[~2009-05-09 17:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1295ed070905071015n5a604f93je366faf55b695e47@mail.gmail.com>
2009-05-07 19:55 ` Alan Stern
2009-05-07 20:35   ` Kay Sievers
2009-05-07 21:18     ` Alan Stern
2009-05-07 21:39       ` Kay Sievers
2009-05-07 22:47         ` Alan Stern
2009-05-07 23:12           ` Kay Sievers
2009-05-08 14:06             ` Alan Stern
2009-05-09 17:00               ` Kay Sievers [this message]
2009-05-09 17:15                 ` Alan Cox
2009-05-09 17:23                   ` Kay Sievers

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=ac3eb2510905091000y4c7a6448uce799d00d500fffe@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pktoss@gmail.com \
    --cc=stern@rowland.harvard.edu \
    /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®