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-05-23 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 knf

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 ap

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 ensur

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 properl

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 --chroo

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 14:

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 14:

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 21:

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, Eric

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 g

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 "init"

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 a

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, b

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 wan

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 require

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 li

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 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 refe

[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