Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-10 Thread Laurent Vivier
On 09/10/2018 17:19, Laurent Vivier wrote: > Le 09/10/2018 à 17:16, Tycho Andersen a écrit : >> On Tue, Oct 09, 2018 at 12:37:52PM +0200, Laurent Vivier wrote: >>> @@ -80,18 +74,32 @@ static int entry_count; >>> */ >>> #define MAX_REGISTER_LENGTH 1920 >>> >>> +static struct binfmt_namespace *b

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-10 Thread Aleksa Sarai
On 2018-10-09, Laurent Vivier wrote: > Le 09/10/2018 à 17:16, Tycho Andersen a écrit : > > On Tue, Oct 09, 2018 at 12:37:52PM +0200, Laurent Vivier wrote: > >> @@ -80,18 +74,32 @@ static int entry_count; > >> */ > >> #define MAX_REGISTER_LENGTH 1920 > >> > >> +static struct binfmt_namespace *

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Laurent Vivier
Le 09/10/2018 à 19:01, Kirill Tkhai a écrit : > On 09.10.2018 19:45, Laurent Vivier wrote: >> Le 09/10/2018 à 18:15, Kirill Tkhai a écrit : >>> On 09.10.2018 13:37, Laurent Vivier wrote: This patch allows to have a different binfmt_misc configuration for each new user namespace. By defaul

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Jann Horn
On Tue, Oct 9, 2018 at 6:57 PM Laurent Vivier wrote: > Le 09/10/2018 à 18:53, Jann Horn a écrit : > > On Tue, Oct 9, 2018 at 6:45 PM Laurent Vivier wrote: > >> Le 09/10/2018 à 18:15, Kirill Tkhai a écrit : > >>> On 09.10.2018 13:37, Laurent Vivier wrote: > This patch allows to have a differe

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Kirill Tkhai
On 09.10.2018 19:45, Laurent Vivier wrote: > Le 09/10/2018 à 18:15, Kirill Tkhai a écrit : >> On 09.10.2018 13:37, Laurent Vivier wrote: >>> This patch allows to have a different binfmt_misc configuration >>> for each new user namespace. By default, the binfmt_misc configuration >>> is the one of t

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Laurent Vivier
Le 09/10/2018 à 18:53, Jann Horn a écrit : > On Tue, Oct 9, 2018 at 6:45 PM Laurent Vivier wrote: >> Le 09/10/2018 à 18:15, Kirill Tkhai a écrit : >>> On 09.10.2018 13:37, Laurent Vivier wrote: This patch allows to have a different binfmt_misc configuration for each new user namespace. B

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Jann Horn
On Tue, Oct 9, 2018 at 6:45 PM Laurent Vivier wrote: > Le 09/10/2018 à 18:15, Kirill Tkhai a écrit : > > On 09.10.2018 13:37, Laurent Vivier wrote: > >> This patch allows to have a different binfmt_misc configuration > >> for each new user namespace. By default, the binfmt_misc configuration > >>

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Laurent Vivier
Le 09/10/2018 à 18:15, Kirill Tkhai a écrit : > On 09.10.2018 13:37, Laurent Vivier wrote: >> This patch allows to have a different binfmt_misc configuration >> for each new user namespace. By default, the binfmt_misc configuration >> is the one of the previous level, but if the binfmt_misc filesys

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Kirill Tkhai
On 09.10.2018 13:37, Laurent Vivier wrote: > This patch allows to have a different binfmt_misc configuration > for each new user namespace. By default, the binfmt_misc configuration > is the one of the previous level, but if the binfmt_misc filesystem is > mounted in the new namespace a new empty b

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Laurent Vivier
Le 09/10/2018 à 17:16, Tycho Andersen a écrit : > On Tue, Oct 09, 2018 at 12:37:52PM +0200, Laurent Vivier wrote: >> @@ -80,18 +74,32 @@ static int entry_count; >> */ >> #define MAX_REGISTER_LENGTH 1920 >> >> +static struct binfmt_namespace *binfmt_ns(struct user_namespace *ns) >> +{ >> +s

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Tycho Andersen
On Tue, Oct 09, 2018 at 12:37:52PM +0200, Laurent Vivier wrote: > @@ -80,18 +74,32 @@ static int entry_count; > */ > #define MAX_REGISTER_LENGTH 1920 > > +static struct binfmt_namespace *binfmt_ns(struct user_namespace *ns) > +{ > + struct binfmt_namespace *b_ns; > + > + while (ns) { >

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Jann Horn
On Tue, Oct 9, 2018 at 3:06 PM Laurent Vivier wrote: > > Le 09/10/2018 à 14:43, Jann Horn a écrit : > > On Tue, Oct 9, 2018 at 12:38 PM Laurent Vivier wrote: > >> This patch allows to have a different binfmt_misc configuration > >> for each new user namespace. By default, the binfmt_misc configur

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Laurent Vivier
Le 09/10/2018 à 14:43, Jann Horn a écrit : > On Tue, Oct 9, 2018 at 12:38 PM Laurent Vivier wrote: >> This patch allows to have a different binfmt_misc configuration >> for each new user namespace. By default, the binfmt_misc configuration >> is the one of the previous level, but if the binfmt_mis

Re: [RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Jann Horn
On Tue, Oct 9, 2018 at 12:38 PM Laurent Vivier wrote: > This patch allows to have a different binfmt_misc configuration > for each new user namespace. By default, the binfmt_misc configuration > is the one of the previous level, but if the binfmt_misc filesystem is > mounted in the new namespace a

[RFC v5 1/1] ns: add binfmt_misc to the user namespace

2018-10-09 Thread Laurent Vivier
This patch allows to have a different binfmt_misc configuration for each new user namespace. By default, the binfmt_misc configuration is the one of the previous level, but if the binfmt_misc filesystem is mounted in the new namespace a new empty binfmt instance is created and used in this namespac