Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-20 Thread Oleg Nesterov
On 12/19, Neil Horman wrote: > > On Wed, Dec 19, 2012 at 05:22:30PM +0100, Oleg Nesterov wrote: > > > I wouldn't worry about it. After looking over the changes Eric just had > merged > for 3.8 I'm becomming more convinced that this isn't really needed anymore. > With > his changes, we can

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-20 Thread Oleg Nesterov
On 12/19, Neil Horman wrote: On Wed, Dec 19, 2012 at 05:22:30PM +0100, Oleg Nesterov wrote: I wouldn't worry about it. After looking over the changes Eric just had merged for 3.8 I'm becomming more convinced that this isn't really needed anymore. With his changes, we can migrate a

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-19 Thread Neil Horman
On Wed, Dec 19, 2012 at 05:22:30PM +0100, Oleg Nesterov wrote: > On 12/18, Neil Horman wrote: > > > > On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: > > > > Perhaps its best just to restrict this patch to adjusting the root fs > > > > location > > > > for the chroot case. > > > >

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-19 Thread Oleg Nesterov
On 12/18, Eric W. Biederman wrote: > > Neil Horman writes: > > > On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: > >> > >> Yes, and we probably want to change pid_ns as well. But afaics currently > >> this is not possible, even setns can't do this. > > The code for setns to change

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-19 Thread Oleg Nesterov
On 12/18, Neil Horman wrote: > > On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: > > > Perhaps its best just to restrict this patch to adjusting the root fs > > > location > > > for the chroot case. > > > > Probably... at least for the start. > > > > BTW. Of course this is

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-19 Thread Oleg Nesterov
On 12/18, Neil Horman wrote: On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: Perhaps its best just to restrict this patch to adjusting the root fs location for the chroot case. Probably... at least for the start. BTW. Of course this is subjective, but personally

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-19 Thread Oleg Nesterov
On 12/18, Eric W. Biederman wrote: Neil Horman nhor...@tuxdriver.com writes: On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: Yes, and we probably want to change pid_ns as well. But afaics currently this is not possible, even setns can't do this. The code for setns to

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-19 Thread Neil Horman
On Wed, Dec 19, 2012 at 05:22:30PM +0100, Oleg Nesterov wrote: On 12/18, Neil Horman wrote: On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: Perhaps its best just to restrict this patch to adjusting the root fs location for the chroot case. Probably... at

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-18 Thread Eric W. Biederman
Neil Horman writes: > On Tue, Dec 18, 2012 at 12:45:18PM -0800, Eric W. Biederman wrote: >> The code for setns to change the pid namespace just merged. >> > Can you post a link to the merge commit for reference so I can take a look at > it?

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-18 Thread Neil Horman
On Tue, Dec 18, 2012 at 12:45:18PM -0800, Eric W. Biederman wrote: > Neil Horman writes: > > > On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: > >> On 12/17, Neil Horman wrote: > >> > > >> > On Mon, Dec 17, 2012 at 05:04:08PM +0100, Oleg Nesterov wrote: > >> > > > >> > > > Is

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-18 Thread Eric W. Biederman
Neil Horman writes: > On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: >> On 12/17, Neil Horman wrote: >> > >> > On Mon, Dec 17, 2012 at 05:04:08PM +0100, Oleg Nesterov wrote: >> > > >> > > > Is there a way to switch all namespaces, except for the pid >> > > > namespace? >> > > >>

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-18 Thread Neil Horman
On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: > On 12/17, Neil Horman wrote: > > > > On Mon, Dec 17, 2012 at 05:04:08PM +0100, Oleg Nesterov wrote: > > > > > > > Is there a way to switch all namespaces, except for the pid > > > > namespace? > > > > > > Which exactly namespaces you

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-18 Thread Oleg Nesterov
On 12/17, Neil Horman wrote: > > On Mon, Dec 17, 2012 at 05:04:08PM +0100, Oleg Nesterov wrote: > > > > > Is there a way to switch all namespaces, except for the pid > > > namespace? > > > > Which exactly namespaces you want to change? > > > Ideally, I want the pipe reader process to execute in

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-18 Thread Oleg Nesterov
On 12/17, Neil Horman wrote: On Mon, Dec 17, 2012 at 05:04:08PM +0100, Oleg Nesterov wrote: Is there a way to switch all namespaces, except for the pid namespace? Which exactly namespaces you want to change? Ideally, I want the pipe reader process to execute in the same namespaces

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-18 Thread Neil Horman
On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: On 12/17, Neil Horman wrote: On Mon, Dec 17, 2012 at 05:04:08PM +0100, Oleg Nesterov wrote: Is there a way to switch all namespaces, except for the pid namespace? Which exactly namespaces you want to change?

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-18 Thread Eric W. Biederman
Neil Horman nhor...@tuxdriver.com writes: On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: On 12/17, Neil Horman wrote: On Mon, Dec 17, 2012 at 05:04:08PM +0100, Oleg Nesterov wrote: Is there a way to switch all namespaces, except for the pid namespace? Which

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-18 Thread Neil Horman
On Tue, Dec 18, 2012 at 12:45:18PM -0800, Eric W. Biederman wrote: Neil Horman nhor...@tuxdriver.com writes: On Tue, Dec 18, 2012 at 09:06:04PM +0100, Oleg Nesterov wrote: On 12/17, Neil Horman wrote: On Mon, Dec 17, 2012 at 05:04:08PM +0100, Oleg Nesterov wrote: Is there a

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-18 Thread Eric W. Biederman
Neil Horman nhor...@tuxdriver.com writes: On Tue, Dec 18, 2012 at 12:45:18PM -0800, Eric W. Biederman wrote: The code for setns to change the pid namespace just merged. Can you post a link to the merge commit for reference so I can take a look at it?

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-17 Thread Neil Horman
On Mon, Dec 17, 2012 at 05:04:08PM +0100, Oleg Nesterov wrote: > On 12/17, Neil Horman wrote: > > > > On Mon, Dec 17, 2012 at 01:34:28PM +0100, Oleg Nesterov wrote: > > > @@ -455,6 +468,14 @@ static int umh_pipe_setup(struct subproc > > > /* and disallow core files too */ > > >

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-17 Thread Oleg Nesterov
On 12/17, Neil Horman wrote: > > On Mon, Dec 17, 2012 at 01:34:28PM +0100, Oleg Nesterov wrote: > > @@ -455,6 +468,14 @@ static int umh_pipe_setup(struct subproc > > /* and disallow core files too */ > > current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; > > > > + > > + if

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-17 Thread Neil Horman
On Mon, Dec 17, 2012 at 01:34:28PM +0100, Oleg Nesterov wrote: > @@ -455,6 +468,14 @@ static int umh_pipe_setup(struct subproc > /* and disallow core files too */ > current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; > > + > + if (cp->switch_ns) { > +

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-17 Thread Oleg Nesterov
@@ -455,6 +468,14 @@ static int umh_pipe_setup(struct subproc /* and disallow core files too */ current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; + + if (cp->switch_ns) { + get_fs_root(cp->cprocess->fs, ); + set_fs_root(current->fs, );

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-17 Thread Neil Horman
On Mon, Dec 17, 2012 at 05:04:08PM +0100, Oleg Nesterov wrote: On 12/17, Neil Horman wrote: On Mon, Dec 17, 2012 at 01:34:28PM +0100, Oleg Nesterov wrote: @@ -455,6 +468,14 @@ static int umh_pipe_setup(struct subproc /* and disallow core files too */

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-17 Thread Oleg Nesterov
@@ -455,6 +468,14 @@ static int umh_pipe_setup(struct subproc /* and disallow core files too */ current-signal-rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; + + if (cp-switch_ns) { + get_fs_root(cp-cprocess-fs, root); + set_fs_root(current-fs,

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-17 Thread Neil Horman
On Mon, Dec 17, 2012 at 01:34:28PM +0100, Oleg Nesterov wrote: @@ -455,6 +468,14 @@ static int umh_pipe_setup(struct subproc /* and disallow core files too */ current-signal-rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; + + if (cp-switch_ns) { +

Re: + core_pattern-set-core-helpers-root-and-namespace-to-crashing-process .patch added to -mm tree

2012-12-17 Thread Oleg Nesterov
On 12/17, Neil Horman wrote: On Mon, Dec 17, 2012 at 01:34:28PM +0100, Oleg Nesterov wrote: @@ -455,6 +468,14 @@ static int umh_pipe_setup(struct subproc /* and disallow core files too */ current-signal-rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; + + if (cp-switch_ns) { +