Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-11-08 Thread Jeff Layton
On Thu, 23 May 2013 14:32:51 -0700 ebied...@xmission.com (Eric W. Biederman) wrote: > "J. Bruce Fields" writes: > > > On Thu, May 23, 2013 at 03:55:47PM -0400, J. Bruce Fields wrote: > >> On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: > >> > What might help most here is to lay out

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-11-08 Thread Jeff Layton
On Thu, 23 May 2013 14:32:51 -0700 ebied...@xmission.com (Eric W. Biederman) wrote: J. Bruce Fields bfie...@fieldses.org writes: On Thu, May 23, 2013 at 03:55:47PM -0400, J. Bruce Fields wrote: On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: What might help most here is to

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-24 Thread Stanislav Kinsbursky
24.05.2013 01:32, Eric W. Biederman пишет: "J. Bruce Fields" writes: On Thu, May 23, 2013 at 03:55:47PM -0400, J. Bruce Fields wrote: On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: What might help most here is to lay out a particular scenario for how you envision setting up

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-24 Thread Stanislav Kinsbursky
24.05.2013 01:32, Eric W. Biederman пишет: J. Bruce Fields bfie...@fieldses.org writes: On Thu, May 23, 2013 at 03:55:47PM -0400, J. Bruce Fields wrote: On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: What might help most here is to lay out a particular scenario for how you

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 23:55, J. Bruce Fields пишет: On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: On Thu, 23 May 2013 15:25:20 +0300 I'm not familiar with nfsdcltrack but I would imagine it receives it's information from Kernel as a command line parameters. Would it not be the simplest

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Eric W. Biederman
"J. Bruce Fields" writes: > On Thu, May 23, 2013 at 03:55:47PM -0400, J. Bruce Fields wrote: >> On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: >> > What might help most here is to lay out a particular scenario for how >> > you envision setting up knfsd in a container so we can

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread J. Bruce Fields
On Thu, May 23, 2013 at 03:55:47PM -0400, J. Bruce Fields wrote: > On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: > > What might help most here is to lay out a particular scenario for how > > you envision setting up knfsd in a container so we can ensure that it's > > addressed

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread J. Bruce Fields
On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: > On Thu, 23 May 2013 15:25:20 +0300 > > I'm not familiar with nfsdcltrack but I would imagine it receives it's > > information from > > Kernel as a command line parameters. > > > > Would it not be the simplest approach to add a

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread J. Bruce Fields
On Wed, May 22, 2013 at 08:37:23PM -0700, Eric W. Biederman wrote: > "J. Bruce Fields" writes: > > > On Wed, May 22, 2013 at 11:35:56AM -0700, Eric W. Biederman wrote: > >> ebied...@xmission.com (Eric W. Biederman) writes: > >> > >> > I am missing a lot of context here and capturing the context

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Jeff Layton
On Thu, 23 May 2013 15:25:20 +0300 Boaz Harrosh wrote: > On 23/05/13 14:58, Stanislav Kinsbursky wrote: > > 23.05.2013 15:56, Jeff Layton пишет: > >> On Thu, 23 May 2013 15:38:17 +0400 > >> Stanislav Kinsbursky wrote: > >> > >>> 23.05.2013 15:31, Jeff Layton пишет: > On Thu, 23 May 2013

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Boaz Harrosh
On 23/05/13 14:58, Stanislav Kinsbursky wrote: > 23.05.2013 15:56, Jeff Layton пишет: >> On Thu, 23 May 2013 15:38:17 +0400 >> Stanislav Kinsbursky wrote: >> >>> 23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky wrote: > 23.05.2013

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 15:56, Jeff Layton пишет: On Thu, 23 May 2013 15:38:17 +0400 Stanislav Kinsbursky wrote: 23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky wrote: 23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky writes: 22.05.2013

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Jeff Layton
On Thu, 23 May 2013 15:38:17 +0400 Stanislav Kinsbursky wrote: > 23.05.2013 15:31, Jeff Layton пишет: > > On Thu, 23 May 2013 14:35:53 +0400 > > Stanislav Kinsbursky wrote: > > > >> 23.05.2013 14:00, Eric W. Biederman пишет: > >>> Stanislav Kinsbursky writes: > >>> > 22.05.2013 21:33,

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky wrote: 23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky writes: 22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky writes: Usermode helper executes all binaries in

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Jeff Layton
On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky wrote: > 23.05.2013 14:00, Eric W. Biederman пишет: > > Stanislav Kinsbursky writes: > > > >> 22.05.2013 21:33, Eric W. Biederman пишет: > >>> Stanislav Kinsbursky writes: > >>> > Usermode helper executes all binaries in global

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky writes: 22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky writes: Usermode helper executes all binaries in global "init" root context. This doesn't allow to call a binary from other root context (for example in

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Eric W. Biederman
Stanislav Kinsbursky writes: > 22.05.2013 21:33, Eric W. Biederman пишет: >> Stanislav Kinsbursky writes: >> >>> Usermode helper executes all binaries in global "init" root context. This >>> doesn't allow to call a binary from other root context (for example in a >>> container). >>> Currently,

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
22.05.2013 22:35, Eric W. Biederman пишет: ebied...@xmission.com (Eric W. Biederman) writes: I am missing a lot of context here and capturing the context of a process at time time we mount the filesystem and reconstituing it in call user mode helper seems like something we could do. If we

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky writes: Usermode helper executes all binaries in global "init" root context. This doesn't allow to call a binary from other root context (for example in a container). Currently, both containerized NFS client and NFS server

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: Usermode helper executes all binaries in global init root context. This doesn't allow to call a binary from other root context (for example in a container). Currently, both containerized NFS

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
22.05.2013 22:35, Eric W. Biederman пишет: ebied...@xmission.com (Eric W. Biederman) writes: I am missing a lot of context here and capturing the context of a process at time time we mount the filesystem and reconstituing it in call user mode helper seems like something we could do. If we

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Eric W. Biederman
Stanislav Kinsbursky skinsbur...@parallels.com writes: 22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: Usermode helper executes all binaries in global init root context. This doesn't allow to call a binary from other root context (for example

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: 22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: Usermode helper executes all binaries in global init root context. This doesn't allow to call a

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Jeff Layton
On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: 22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes:

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky skinsbur...@parallels.com writes: 22.05.2013 21:33, Eric W. Biederman пишет: Stanislav Kinsbursky

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Jeff Layton
On Thu, 23 May 2013 15:38:17 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 14:00, Eric W. Biederman пишет: Stanislav Kinsbursky

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 15:56, Jeff Layton пишет: On Thu, 23 May 2013 15:38:17 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 14:00, Eric W. Biederman

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Boaz Harrosh
On 23/05/13 14:58, Stanislav Kinsbursky wrote: 23.05.2013 15:56, Jeff Layton пишет: On Thu, 23 May 2013 15:38:17 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 15:31, Jeff Layton пишет: On Thu, 23 May 2013 14:35:53 +0400 Stanislav Kinsbursky skinsbur...@parallels.com

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Jeff Layton
On Thu, 23 May 2013 15:25:20 +0300 Boaz Harrosh bharr...@panasas.com wrote: On 23/05/13 14:58, Stanislav Kinsbursky wrote: 23.05.2013 15:56, Jeff Layton пишет: On Thu, 23 May 2013 15:38:17 +0400 Stanislav Kinsbursky skinsbur...@parallels.com wrote: 23.05.2013 15:31, Jeff Layton пишет:

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread J. Bruce Fields
On Wed, May 22, 2013 at 08:37:23PM -0700, Eric W. Biederman wrote: J. Bruce Fields bfie...@fieldses.org writes: On Wed, May 22, 2013 at 11:35:56AM -0700, Eric W. Biederman wrote: ebied...@xmission.com (Eric W. Biederman) writes: I am missing a lot of context here and capturing the

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread J. Bruce Fields
On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: On Thu, 23 May 2013 15:25:20 +0300 I'm not familiar with nfsdcltrack but I would imagine it receives it's information from Kernel as a command line parameters. Would it not be the simplest approach to add a

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread J. Bruce Fields
On Thu, May 23, 2013 at 03:55:47PM -0400, J. Bruce Fields wrote: On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: What might help most here is to lay out a particular scenario for how you envision setting up knfsd in a container so we can ensure that it's addressed properly by

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Eric W. Biederman
J. Bruce Fields bfie...@fieldses.org writes: On Thu, May 23, 2013 at 03:55:47PM -0400, J. Bruce Fields wrote: On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: What might help most here is to lay out a particular scenario for how you envision setting up knfsd in a container so we

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-23 Thread Stanislav Kinsbursky
23.05.2013 23:55, J. Bruce Fields пишет: On Thu, May 23, 2013 at 09:05:26AM -0400, Jeff Layton wrote: On Thu, 23 May 2013 15:25:20 +0300 I'm not familiar with nfsdcltrack but I would imagine it receives it's information from Kernel as a command line parameters. Would it not be the simplest

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Eric W. Biederman
"J. Bruce Fields" writes: > On Wed, May 22, 2013 at 11:35:56AM -0700, Eric W. Biederman wrote: >> ebied...@xmission.com (Eric W. Biederman) writes: >> >> > I am missing a lot of context here and capturing the context of a >> > process at time time we mount the filesystem and reconstituing it in

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread J. Bruce Fields
On Wed, May 22, 2013 at 11:35:56AM -0700, Eric W. Biederman wrote: > ebied...@xmission.com (Eric W. Biederman) writes: > > > I am missing a lot of context here and capturing the context of a > > process at time time we mount the filesystem and reconstituing it in > > call user mode helper seems

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: > I am missing a lot of context here and capturing the context of a > process at time time we mount the filesystem and reconstituing it in > call user mode helper seems like something we could do. If we want to do something like this the only

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Eric W. Biederman
Stanislav Kinsbursky writes: > Usermode helper executes all binaries in global "init" root context. This > doesn't allow to call a binary from other root context (for example in a > container). > Currently, both containerized NFS client and NFS server requires an ability to > execute a binary in

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Oleg Nesterov
On 05/22, Stanislav Kinsbursky wrote: > > +static int umh_set_fs_root(struct subprocess_info *info, struct cred *new) > +{ > + set_fs_root(current->fs, info->data); > + return 0; > +} > + > +/* > + * Call a usermode helper with a specific fs root. > + * > + * The caller must hold extra

[RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Stanislav Kinsbursky
Usermode helper executes all binaries in global "init" root context. This doesn't allow to call a binary from other root context (for example in a container). Currently, both containerized NFS client and NFS server requires an ability to execute a binary in a container's root context. Root swap

[RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Stanislav Kinsbursky
Usermode helper executes all binaries in global init root context. This doesn't allow to call a binary from other root context (for example in a container). Currently, both containerized NFS client and NFS server requires an ability to execute a binary in a container's root context. Root swap can

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Oleg Nesterov
On 05/22, Stanislav Kinsbursky wrote: +static int umh_set_fs_root(struct subprocess_info *info, struct cred *new) +{ + set_fs_root(current-fs, info-data); + return 0; +} + +/* + * Call a usermode helper with a specific fs root. + * + * The caller must hold extra reference to it

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Eric W. Biederman
Stanislav Kinsbursky skinsbur...@parallels.com writes: Usermode helper executes all binaries in global init root context. This doesn't allow to call a binary from other root context (for example in a container). Currently, both containerized NFS client and NFS server requires an ability to

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Eric W. Biederman
ebied...@xmission.com (Eric W. Biederman) writes: I am missing a lot of context here and capturing the context of a process at time time we mount the filesystem and reconstituing it in call user mode helper seems like something we could do. If we want to do something like this the only sane

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread J. Bruce Fields
On Wed, May 22, 2013 at 11:35:56AM -0700, Eric W. Biederman wrote: ebied...@xmission.com (Eric W. Biederman) writes: I am missing a lot of context here and capturing the context of a process at time time we mount the filesystem and reconstituing it in call user mode helper seems like

Re: [RFC PATCH] fs: call_usermodehelper_root helper introduced

2013-05-22 Thread Eric W. Biederman
J. Bruce Fields bfie...@fieldses.org writes: On Wed, May 22, 2013 at 11:35:56AM -0700, Eric W. Biederman wrote: ebied...@xmission.com (Eric W. Biederman) writes: I am missing a lot of context here and capturing the context of a process at time time we mount the filesystem and