<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 9, 2013 at 2:51 AM, Eric W. Biederman <span dir="ltr"><<a href="mailto:ebiederm@xmission.com" target="_blank">ebiederm@xmission.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">Amir Goldstein <<a href="mailto:amir@cellrox.com">amir@cellrox.com</a>> writes:<br>

<br>
> On Fri, Sep 6, <a href="tel:2013" value="+9722013">2013</a> at 7:50 PM, Eric W. Biederman<br>
> <<a href="mailto:ebiederm@xmission.com">ebiederm@xmission.com</a>> wrote:<br>
><br>
</div><div class="im">> Hi Eric,<br>
><br>
> If we can get people to take a quick look at the code before LPC<br>
> that could make the LPC discussions more effective.<br>
> Even looking at one of the subsystem patches can give a basic<br>
> idea of the work we have done:<br>
> <a href="https://github.com/Cellrox/linux/commits/devns-goldfish-3.4" target="_blank">https://github.com/Cellrox/linux/commits/devns-goldfish-3.4</a><br>
><br>
>     I think you are talking about having wrappers around your devices<br>
>     so you<br>
>     can share.  Which is not the quite same problem the rest of us<br>
>     have been<br>
>     thinking of when talking about a device namespace.<br>
><br>
> We are interested in all problems related to virtualizated view of<br>
> devices<br>
> inside a container, so let our work so far be a starting point to<br>
> discuss all of them.<br>
><br>
>     My first impression is that this is better solved with more<br>
>     appropriate<br>
>     abstractions in userspace or in the kernel.<br>
<br>
</div>As I read your code, you are solving the problem of one opener of a<br>
device among a group of openers being able to access a device at a time.<br>
Which leads to the question why can't the multiplexing happen in<br>
userspace?<br>
<br>
I think with your design it would not be possible to play a song in one<br>
device namespace while doing work in the other.  As a security model<br>
that isn't wrong but as someone trying to get work done that could be a<br>
real pain.<br></blockquote><div><br></div><div>As a matter of fact, in our multi persona phone, you *can* hear music played</div><div>from background persona, but you *cannot* see images drawn from background</div><div>persona.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
The more common concern is to have devices we can use all of the time.<br>
<br>
There may be a need for a device namespace and multiplexing access to<br>
hardware devices makes that clearer.  So far nothing has risen to the<br>
level of we actually need a device namespace to do X.  Especially in an<br>
erra of hotplug and dynamic device numbers.<br>
<br>
It is arguable that you could do your kind of device multiplexing with a<br>
fuse device in userspace that implements your desired policy.<br></blockquote><div><br></div><div>I agree about it being arguable :-)</div><div>We shall present our arguments on LPC.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
And policy is where cell situtation seems to fall down because it hard<br>
codes one specific policy into the kernel, and a policy most situations<br>
don't find useful.<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div>It's true that for our product, we have made hardcoded policy decisions in our kernel<br></div><div>patches, but that was just as a proof of concept for the technique.</div>
<div><br></div><div>We do envision being able to dynamically assign a device to a specific devns</div><div>(e.g. block,loop) keep a device shared between multi devns (e.g. audio)</div><div>and in addition to that, being able to multiplex a device between multi devns (e.g. framebuffer)</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><font color="#888888">
Eric<br>
</font></span></blockquote></div><br></div></div>