From: ebiederm@xmission.com (Eric W. Biederman)
To: riya khanna <riyakhanna1983@gmail.com>
Cc: LXC development mailing-list
<lxc-devel@lists.linuxcontainers.org>,
Miklos Szeredi <miklos@szeredi.hu>,
fuse-devel <fuse-devel@lists.sourceforge.net>,
Tejun Heo <tj@kernel.org>,
Seth Forshee <seth.forshee@canonical.com>,
linux-kernel@vger.kernel.org,
Serge Hallyn <serge.hallyn@ubuntu.com>
Subject: Using devices in Containers (was: [lxc-devel] device namespaces)
Date: Wed, 24 Sep 2014 10:43:12 -0700 [thread overview]
Message-ID: <8738bglxsf.fsf_-_@x220.int.ebiederm.org> (raw)
In-Reply-To: <20140924163740.GD3865@ubuntumail> (Serge Hallyn's message of "Wed, 24 Sep 2014 16:37:40 +0000")
Serge Hallyn <serge.hallyn@ubuntu.com> writes:
> Isolation is provided by the devices cgroup. You want something more
> than isolation.
>
> Quoting riya khanna (riyakhanna1983@gmail.com):
>> My use case for having device namespaces is device isolation. Isn't what
>> namespaces are there for (as I understand)?
Namespaces fundamentally provide for using the same ``global'' name
in different contexts. This allows them to be used for isolation
and process migration (because you can take the same name from
machine to machine).
Unless someone cares about device numbers at a namespace level
the work is done.
The mount namespace provides exsits to deal with file names.
The devices cgroup will limit which devices you can access (although
I can't ever imagine a case where the mout namespace would be
insufficient).
>> Not everything should be
>> accessible (or even visible) from a container all the time (we have seen
>> people come up with different use cases for this). However, bind-mounting
>> takes away this flexibility.
I don't see how. If they are mounts that propogate into the container
and are controlled from outside you can do whatever you want. (I am
imagining device by device bind mounts here). It should be trivial
to have a a directory tree that propogates into a container and works.
>> I agree that assigning fixed device numbers is
>> clearly not a long-term solution. Emulation for safe and flexible
>> multiplexing, like you suggested either using CUSE/FUSE or something like
>> devpts, is what I'm exploring.
Is the problem you actually care about multiplexing devices?
I think there is quite a bit of room to talk about how to safely
and effectively use devices in containers. So let's make that the
discussion. No one actually wants device number namespaces and talking
about them only muddies the watters.
Eric
next prev parent reply other threads:[~2014-09-24 17:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CALRD3qKmpzJCRszkG_S9Z3XgoTGWVMFd7FqeJh+W-9pZqPVhCg@mail.gmail.com>
2014-09-24 5:04 ` [lxc-devel] device namespaces Eric W. Biederman
[not found] ` <CALRD3qKPJHmmY2DSNNfNKzmLihDLm9fgBQprCXNMHVOArV4iuw@mail.gmail.com>
2014-09-24 16:37 ` Serge Hallyn
2014-09-24 17:43 ` Eric W. Biederman [this message]
2014-09-24 19:30 ` Using devices in Containers (was: [lxc-devel] device namespaces) Riya Khanna
2014-09-24 22:38 ` Using devices in Containers Eric W. Biederman
[not found] ` <CALRD3qLYAc+K8e1xYb27ipi4KyGRmTxokPCHN0L_zta=Cy9sCQ@mail.gmail.com>
2014-09-25 15:40 ` riya khanna
2014-09-25 18:09 ` Eric W. Biederman
2014-09-25 18:21 ` Eric W. Biederman
2014-09-24 19:07 ` [lxc-devel] device namespaces Riya Khanna
2014-09-24 16:38 ` Serge Hallyn
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=8738bglxsf.fsf_-_@x220.int.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=fuse-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lxc-devel@lists.linuxcontainers.org \
--cc=miklos@szeredi.hu \
--cc=riyakhanna1983@gmail.com \
--cc=serge.hallyn@ubuntu.com \
--cc=seth.forshee@canonical.com \
--cc=tj@kernel.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