All of lore.kernel.org
 help / color / mirror / Atom feed
* call_usermodehelper in containers
@ 2013-11-11 12:18 Jeff Layton
  2013-11-11 12:43 ` [Devel] " Vasily Kulikov
  2013-11-12  0:47 ` Greg KH
  0 siblings, 2 replies; 49+ messages in thread
From: Jeff Layton @ 2013-11-11 12:18 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, linux-nfs, Stanislav Kinsbursky
  Cc: devel, ebiederm, oleg, bfields, bharrosh

We have a bit of a problem wrt to upcalls that use call_usermodehelper
with containers and I'd like to bring this to some sort of resolution...

A particularly problematic case (though there are others) is the
nfsdcltrack upcall. It basically uses call_usermodehelper to run a
program in userland to track some information on stable storage for
nfsd.

One could envision nfsd running on a machine with several containers,
and each would need to track its own database of info on stable
storage. When processing RPCs that come into the network address within
a certain container, we want to ensure that it tracks this info inside
the mount namespace within that container as well.

So, we ideally need to ensure that when this upcall is run, that we run
the correct binary in the container *and* that it does all of its file
I/O within the correct mount namespace. We might also need other
namespace swapping as well.

Stanislav posted a patch a few months ago that tried to address this:

    https://lkml.org/lkml/2013/5/22/80

However, it failed to address some problems -- namely that we have to
consider the case where a container may be running with reduced
capabilities. We want to ensure that the UMH upcall inherits the
correct capability set for its container as well.

What's the correct approach to fix this? One possibility would be to
keep a kernel thread around that sits in the correct namespace(s) and
has the right privileges, and then use that to launch UMH programs.
That thread could be spawned whenever someone runs rpc.nfsd inside a
container.

Not very elegant, but it seems like something that would work.

Are there better approaches?

-- 
Jeff Layton <jlayton@redhat.com>

^ permalink raw reply	[flat|nested] 49+ messages in thread

end of thread, other threads:[~2016-03-25  7:26 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-11 12:18 call_usermodehelper in containers Jeff Layton
2013-11-11 12:43 ` [Devel] " Vasily Kulikov
2013-11-11 13:26   ` Jeff Layton
2013-11-12  0:47 ` Greg KH
2013-11-12 11:12   ` Jeff Layton
2013-11-12 13:02     ` Stanislav Kinsbursky
2013-11-12 13:30       ` Jeff Layton
2013-11-15  5:05         ` Eric W. Biederman
2013-11-15 10:40         ` Stanislav Kinsbursky
2013-11-15 11:03           ` Eric W. Biederman
2013-11-15 11:54             ` Stanislav Kinsbursky
2016-02-12 23:39               ` Ian Kent
2016-02-13 16:08                 ` Stanislav Kinsburskiy
2016-02-15  0:11                   ` Ian Kent
     [not found]                     ` <1455495082.2941.32.camel-PKsaG3nR2I+sTnJN9+BGXg@public.gmane.org>
2016-02-18  3:17                       ` Eric W. Biederman
2016-02-18  3:17                         ` Eric W. Biederman
2013-11-18 17:28             ` Oleg Nesterov
2013-11-18 18:02               ` Oleg Nesterov
2013-11-19 14:51                 ` Jeff Layton
2016-02-11  0:17               ` Ian Kent
     [not found]                 ` <1455149857.2903.9.camel-PKsaG3nR2I+sTnJN9+BGXg@public.gmane.org>
2016-02-18  2:57                   ` Eric W. Biederman
2016-02-18  2:57                     ` Eric W. Biederman
     [not found]                     ` <8737sq4teb.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-02-18  3:43                       ` Kamezawa Hiroyuki
2016-02-18  3:43                         ` Kamezawa Hiroyuki
2016-02-18  6:36                         ` Ian Kent
2016-02-18  7:37                           ` Ian Kent
     [not found]                             ` <1455781033.2908.5.camel-PKsaG3nR2I+sTnJN9+BGXg@public.gmane.org>
2016-02-18 20:45                               ` Eric W. Biederman
2016-02-18 20:45                                 ` Eric W. Biederman
     [not found]                                 ` <87r3g9ychc.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-02-19  3:08                                   ` Kamezawa Hiroyuki
2016-02-19  3:08                                     ` Kamezawa Hiroyuki
     [not found]                                     ` <56C68714.2000900-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2016-02-19  5:37                                       ` Ian Kent
2016-02-19  5:37                                     ` Ian Kent
     [not found]                                       ` <1455860260.3356.31.camel-PKsaG3nR2I+sTnJN9+BGXg@public.gmane.org>
2016-02-19  9:30                                         ` Kamezawa Hiroyuki
2016-02-19  9:30                                           ` Kamezawa Hiroyuki
     [not found]                                           ` <56C6E0A8.3010806-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2016-02-20  3:28                                             ` Ian Kent
2016-02-20  3:28                                               ` Ian Kent
2016-02-19  5:14                                   ` Ian Kent
2016-02-19  5:14                                     ` Ian Kent
2016-02-23  2:55                                     ` Ian Kent
     [not found]                                       ` <1456196130.2911.10.camel-PKsaG3nR2I+sTnJN9+BGXg@public.gmane.org>
2016-02-23 14:36                                         ` J. Bruce Fields
2016-02-23 14:36                                       ` J. Bruce Fields
     [not found]                                         ` <20160223143627.GB31951-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>
2016-02-24  0:55                                           ` Ian Kent
2016-02-24  0:55                                             ` Ian Kent
     [not found]                                     ` <1455858850.3356.19.camel-PKsaG3nR2I+sTnJN9+BGXg@public.gmane.org>
2016-02-23  2:55                                       ` Ian Kent
     [not found]                           ` <1455777387.3188.24.camel-PKsaG3nR2I+sTnJN9+BGXg@public.gmane.org>
2016-02-18  7:37                             ` Ian Kent
     [not found]                         ` <56C53DE3.1070108-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2016-02-18  6:36                           ` Ian Kent
2016-03-24  7:45               ` Ian Kent
2016-03-25  1:28                 ` Oleg Nesterov
2016-03-25  7:25                   ` Ian Kent

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.