Linux Container Development
 help / color / mirror / Atom feed
From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman)
To: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH] userns: enable tmpfs support for user namespace.
Date: Wed, 19 Sep 2012 03:40:20 -0700	[thread overview]
Message-ID: <87wqzq8fe3.fsf@xmission.com> (raw)
In-Reply-To: <1348042588-9031-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> (Gao feng's message of "Wed, 19 Sep 2012 16:16:28 +0800")

Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org> writes:

> mounting tmpfs in user namespace does no harm to the host.
> so enable tmpfs support for the user namespace.

I think this allows escaping from memory resource limits.

Eric

> Signed-off-by: Gao feng <gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
> ---
>  mm/shmem.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/mm/shmem.c b/mm/shmem.c
> index d4e184e..ef97dc3 100644
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -2801,6 +2801,7 @@ static struct file_system_type shmem_fs_type = {
>  	.name		= "tmpfs",
>  	.mount		= shmem_mount,
>  	.kill_sb	= kill_litter_super,
> +	.fs_flags	= FS_USERNS_MOUNT,
>  };
>  
>  int __init shmem_init(void)

  parent reply	other threads:[~2012-09-19 10:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19  8:16 [PATCH] userns: enable tmpfs support for user namespace Gao feng
     [not found] ` <1348042588-9031-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-09-19 10:40   ` Eric W. Biederman [this message]
     [not found]     ` <87wqzq8fe3.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-09-20  0:39       ` Gao feng
     [not found]         ` <505A65AB.4000703-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-09-20  0:59           ` Eric W. Biederman
     [not found]             ` <874nmt5x1r.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-10-24  7:49               ` Gao feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wqzq8fe3.fsf@xmission.com \
    --to=ebiederm-as9lmozglivwk0htik3j/w@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox