RE: [PATCH V2] binder: ipc namespace support for android binder

2018-11-08 Thread 周威
> From: Davidlohr Bueso > Sent: Thursday, November 8, 2018 3:00 PM > > On Mon, 29 Oct 2018, chouryzhou(??) wrote: > >@@ -63,6 +63,12 @@ struct ipc_namespace { > >unsigned intmq_msg_default; > >unsigned intmq_msgsize_default; > > > >+ /* next fields are for

RE: [PATCH V2] binder: ipc namespace support for android binder

2018-11-08 Thread 周威
> From: Davidlohr Bueso > Sent: Thursday, November 8, 2018 3:00 PM > > On Mon, 29 Oct 2018, chouryzhou(??) wrote: > >@@ -63,6 +63,12 @@ struct ipc_namespace { > >unsigned intmq_msg_default; > >unsigned intmq_msgsize_default; > > > >+ /* next fields are for

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread Davidlohr Bueso
On Mon, 29 Oct 2018, chouryzhou(??) wrote: @@ -63,6 +63,12 @@ struct ipc_namespace { unsigned intmq_msg_default; unsigned intmq_msgsize_default; + /* next fields are for binder */ + struct mutex binder_procs_lock; + struct hlist_head

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread Davidlohr Bueso
On Mon, 29 Oct 2018, chouryzhou(??) wrote: @@ -63,6 +63,12 @@ struct ipc_namespace { unsigned intmq_msg_default; unsigned intmq_msgsize_default; + /* next fields are for binder */ + struct mutex binder_procs_lock; + struct hlist_head

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread Davidlohr Bueso
On Wed, 07 Nov 2018, Bueso wrote: On Mon, 29 Oct 2018, chouryzhou(??) wrote: +// If init_ipc_ns is not defined elsewhere, +// we make a fake one here to put our variable. /* * comments like this please */ Actually, just drop the comment altogether. Forward declaring does not merit it.

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread Davidlohr Bueso
On Wed, 07 Nov 2018, Bueso wrote: On Mon, 29 Oct 2018, chouryzhou(??) wrote: +// If init_ipc_ns is not defined elsewhere, +// we make a fake one here to put our variable. /* * comments like this please */ Actually, just drop the comment altogether. Forward declaring does not merit it.

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread Davidlohr Bueso
On Mon, 29 Oct 2018, chouryzhou(??) wrote: +// If init_ipc_ns is not defined elsewhere, +// we make a fake one here to put our variable. /* * comments like this please */ +#if !defined(CONFIG_SYSVIPC) && !defined(CONFIG_POSIX_MQUEUE) +struct ipc_namespace init_ipc_ns; ... ---

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread Davidlohr Bueso
On Mon, 29 Oct 2018, chouryzhou(??) wrote: +// If init_ipc_ns is not defined elsewhere, +// we make a fake one here to put our variable. /* * comments like this please */ +#if !defined(CONFIG_SYSVIPC) && !defined(CONFIG_POSIX_MQUEUE) +struct ipc_namespace init_ipc_ns; ... ---

RE: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread 周威
Re: [PATCH V2] binder: ipc namespace support for android > binder > > On Wed, 7 Nov 2018 01:48:12 + chouryzhou(周威) > wrote: > > > > > --- a/ipc/namespace.c > > > > +++ b/ipc/namespace.c > > > > @@ -56,6 +56,9 @@ static struct ipc_namespace

RE: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread 周威
Re: [PATCH V2] binder: ipc namespace support for android > binder > > On Wed, 7 Nov 2018 01:48:12 + chouryzhou(周威) > wrote: > > > > > --- a/ipc/namespace.c > > > > +++ b/ipc/namespace.c > > > > @@ -56,6 +56,9 @@ static struct ipc_namespace

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread Andrew Morton
On Wed, 7 Nov 2018 01:48:12 + chouryzhou(周威) wrote: > > > --- a/ipc/namespace.c > > > +++ b/ipc/namespace.c > > > @@ -56,6 +56,9 @@ static struct ipc_namespace *create_ipc_ns(struct > > user_namespace *user_ns, > > > ns->ucounts = ucounts; > > > > > > err = mq_init_ns(ns); >

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-07 Thread Andrew Morton
On Wed, 7 Nov 2018 01:48:12 + chouryzhou(周威) wrote: > > > --- a/ipc/namespace.c > > > +++ b/ipc/namespace.c > > > @@ -56,6 +56,9 @@ static struct ipc_namespace *create_ipc_ns(struct > > user_namespace *user_ns, > > > ns->ucounts = ucounts; > > > > > > err = mq_init_ns(ns); >

RE: [PATCH V2] binder: ipc namespace support for android binder

2018-11-06 Thread 周威
ubject: Re: [PATCH V2] binder: ipc namespace support for android > binder > > On Mon, 29 Oct 2018 06:18:11 + chouryzhou(周威) > wrote: > > > We are working for running android in container, but we found that binder > is > > not isolated by ipc namespace. Since binder

RE: [PATCH V2] binder: ipc namespace support for android binder

2018-11-06 Thread 周威
ubject: Re: [PATCH V2] binder: ipc namespace support for android > binder > > On Mon, 29 Oct 2018 06:18:11 + chouryzhou(周威) > wrote: > > > We are working for running android in container, but we found that binder > is > > not isolated by ipc namespace. Since binder

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-06 Thread Andrew Morton
On Mon, 29 Oct 2018 06:18:11 + chouryzhou(周威) wrote: > We are working for running android in container, but we found that binder is > not isolated by ipc namespace. Since binder is a form of IPC and therefore > should > be tied to ipc namespace. With this patch, we can run more than one

Re: [PATCH V2] binder: ipc namespace support for android binder

2018-11-06 Thread Andrew Morton
On Mon, 29 Oct 2018 06:18:11 + chouryzhou(周威) wrote: > We are working for running android in container, but we found that binder is > not isolated by ipc namespace. Since binder is a form of IPC and therefore > should > be tied to ipc namespace. With this patch, we can run more than one

[PATCH V2] binder: ipc namespace support for android binder

2018-10-29 Thread 周威
We are working for running android in container, but we found that binder is not isolated by ipc namespace. Since binder is a form of IPC and therefore should be tied to ipc namespace. With this patch, we can run more than one android container on one host. This patch move "binder_procs" and

[PATCH V2] binder: ipc namespace support for android binder

2018-10-29 Thread 周威
We are working for running android in container, but we found that binder is not isolated by ipc namespace. Since binder is a form of IPC and therefore should be tied to ipc namespace. With this patch, we can run more than one android container on one host. This patch move "binder_procs" and