From: Greg KH <gregkh@linuxfoundation.org>
To: Lukasz Pawelczyk <havner@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
libvir-list@redhat.com, lxc-devel@lists.linuxcontainers.org,
systemd-devel@lists.freedesktop.org,
David Herrmann <dh.herrmann@gmail.com>
Subject: Re: [systemd-devel] Suspending access to opened/active /dev/nodes during application runtime
Date: Fri, 7 Mar 2014 12:55:40 -0800 [thread overview]
Message-ID: <20140307205540.GA6354@kroah.com> (raw)
In-Reply-To: <93871091-7845-4BCC-A841-F724BEDF6E4B@gmail.com>
On Fri, Mar 07, 2014 at 09:45:28PM +0100, Lukasz Pawelczyk wrote:
>
> On 7 Mar 2014, at 20:09, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> > On Fri, Mar 07, 2014 at 07:46:44PM +0100, Lukasz Pawelczyk wrote:
> >> Problem:
> >> Has anyone thought about a mechanism to limit/remove an access to a
> >> device during an application runtime? Meaning we have an application
> >> that has an open file descriptor to some /dev/node and depending on
> >> *something* it gains or looses the access to it gracefully (with or
> >> without a notification, but without any fatal consequences).
> >>
> >> Example:
> >> LXC. Imagine we have 2 separate containers. Both running full operating
> >> systems. Specifically with 2 X servers. Both running concurrently of
> >> course. Both need the same input devices (e.g. we have just one mouse).
> >
> > Stop right there.
> >
> > If they "both" need an input device, then they should use the "shared"
> > input device stream, i.e. evdev.
> >
> > And it goes the same for every type of device the kernel is exposing to
> > userspace, if you want to "share" them, then you need to work on
> > changing the kernel to be able to handle shared devices.
>
> I think you might have misunderstood me. They are using a shared input
> stream (evdev in this case). The problem is I don’t want them to
> eavesdrop on each other. So it’s not about making it to work. It’s
> about making them to work „in turns”.
See Lennart's comment about namespaces for devices, and how the kernel
doesn't support it, for the answer to this.
Sorry, not going to happen, use real virtual machines if you want to do
this.
greg k-h
next prev parent reply other threads:[~2014-03-07 20:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 18:46 Suspending access to opened/active /dev/nodes during application runtime Lukasz Pawelczyk
2014-03-07 19:09 ` [systemd-devel] " Greg KH
2014-03-07 20:45 ` Lukasz Pawelczyk
2014-03-07 20:55 ` Greg KH [this message]
[not found] <9D7BA6C9-9F1F-4D09-8F4F-E7DA4720FF97@gmail.com>
2014-03-07 19:24 ` Lennart Poettering
2014-03-07 20:51 ` Lukasz Pawelczyk
2014-03-08 2:39 ` Lennart Poettering
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=20140307205540.GA6354@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=dh.herrmann@gmail.com \
--cc=havner@gmail.com \
--cc=libvir-list@redhat.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lxc-devel@lists.linuxcontainers.org \
--cc=systemd-devel@lists.freedesktop.org \
/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