mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Cedric Le Goater <clg@fr.ibm.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
	Andrew Morton <akpm@osdl.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm] user_ns: remove CONFIG_USER_NS
Date: Tue, 16 Jan 2007 08:53:12 -0600	[thread overview]
Message-ID: <20070116145312.GB28253@sergelap.austin.ibm.com> (raw)
In-Reply-To: <45ACB13F.4020607@fr.ibm.com>

Quoting Cedric Le Goater (clg@fr.ibm.com):
> It doesn't look that useful anyway, it just deactivates the unshare
> capability for the user namespace.
> 
> Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>

Agreed on both this and CONFIG_UTS_NS.  (I haven't looked closely enough
at the CONFIG_IPC_NS case yet)

Acked-by: Serge Hallyn <serue@us.ibm.com>

thanks,
-serge

> ---
>  include/linux/sched.h          |    9 ---------
>  include/linux/user_namespace.h |   33 ---------------------------------
>  init/Kconfig                   |    4 ----
>  kernel/user_namespace.c        |    3 ---
>  4 files changed, 49 deletions(-)
> 
> Index: 2.6.20-rc4-mm1/include/linux/sched.h
> ===================================================================
> --- 2.6.20-rc4-mm1.orig/include/linux/sched.h
> +++ 2.6.20-rc4-mm1/include/linux/sched.h
> @@ -1603,7 +1603,6 @@ extern int cond_resched(void);
>  extern int cond_resched_lock(spinlock_t * lock);
>  extern int cond_resched_softirq(void);
> 
> -#ifdef CONFIG_USER_NS
>  /*
>   * Check whether a task and a vfsmnt belong to the same uidns.
>   * Since the initial namespace is exempt from these checks,
> @@ -1622,14 +1621,6 @@ static inline int task_mnt_same_uidns(st
>  		return 1;
>  	return 0;
>  }
> -#else
> -static inline int task_mnt_same_uidns(struct task_struct *tsk,
> -					struct vfsmount *mnt)
> -{
> -	return 1;
> -}
> -#endif
> -
> 
>  /*
>   * Does a critical section need to be broken due to another
> Index: 2.6.20-rc4-mm1/include/linux/user_namespace.h
> ===================================================================
> --- 2.6.20-rc4-mm1.orig/include/linux/user_namespace.h
> +++ 2.6.20-rc4-mm1/include/linux/user_namespace.h
> @@ -16,8 +16,6 @@ struct user_namespace {
> 
>  extern struct user_namespace init_user_ns;
> 
> -#ifdef CONFIG_USER_NS
> -
>  static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
>  {
>  	if (ns)
> @@ -45,35 +43,4 @@ static inline int clone_mnt_userns_permi
>  	return 1;
>  }
> 
> -#else
> -
> -static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
> -{
> -	return NULL;
> -}
> -
> -static inline int unshare_user_ns(unsigned long flags,
> -			 struct user_namespace **new_user)
> -{
> -	if (flags & CLONE_NEWUSER)
> -		return -EINVAL;
> -
> -	return 0;
> -}
> -
> -static inline int copy_user_ns(int flags, struct task_struct *tsk)
> -{
> -	return 0;
> -}
> -
> -static inline void put_user_ns(struct user_namespace *ns)
> -{
> -}
> -
> -static inline int clone_mnt_userns_permission(struct vfsmount *old)
> -{
> -	return 1;
> -}
> -#endif
> -
>  #endif /* _LINUX_USER_H */
> Index: 2.6.20-rc4-mm1/init/Kconfig
> ===================================================================
> --- 2.6.20-rc4-mm1.orig/init/Kconfig
> +++ 2.6.20-rc4-mm1/init/Kconfig
> @@ -222,10 +222,6 @@ config UTS_NS
>  	  vservers, to use uts namespaces to provide different
>  	  uts info for different servers.  If unsure, say N.
> 
> -config USER_NS
> -	bool
> -	default y
> -
>  config AUDIT
>  	bool "Auditing support"
>  	depends on NET
> Index: 2.6.20-rc4-mm1/kernel/user_namespace.c
> ===================================================================
> --- 2.6.20-rc4-mm1.orig/kernel/user_namespace.c
> +++ 2.6.20-rc4-mm1/kernel/user_namespace.c
> @@ -19,7 +19,6 @@ struct user_namespace init_user_ns = {
> 
>  EXPORT_SYMBOL_GPL(init_user_ns);
> 
> -#ifdef CONFIG_USER_NS
>  /*
>   * Clone a new ns copying an original user ns, setting refcount to 1
>   * @old_ns: namespace to clone
> @@ -110,5 +109,3 @@ void free_user_ns(struct kref *kref)
>  	ns = container_of(kref, struct user_namespace, kref);
>  	kfree(ns);
>  }
> -
> -#endif /* CONFIG_USER_NS */

  reply	other threads:[~2007-01-16 14:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-04 18:06 [PATCH -mm 0/8] user ns: Introduction Serge E. Hallyn
2007-01-04 18:10 ` [PATCH -mm 1/8] nsproxy: externalizes exit_task_namespaces Serge E. Hallyn
2007-01-04 18:11 ` [PATCH -mm 2/8] user namespace: add the framework Serge E. Hallyn
2007-01-04 21:16   ` Serge E. Hallyn
2007-01-04 18:11 ` [PATCH -mm 3/8] user ns: add user_namespace ptr to vfsmount Serge E. Hallyn
2007-01-04 18:11 ` [PATCH -mm 4/8] user ns: hook permission Serge E. Hallyn
2007-01-04 18:12 ` [PATCH -mm 5/8] user ns: prepare copy_tree, copy_mnt, and their callers to handle errs Serge E. Hallyn
2007-01-04 19:00   ` Frederik Deweerdt
2007-01-04 19:35     ` Serge E. Hallyn
2007-01-04 18:12 ` [PATCH -mm 6/8] user ns: implement shared mounts Serge E. Hallyn
2007-01-04 18:12 ` [PATCH -mm 7/8] user_ns: handle file sigio Serge E. Hallyn
2007-01-12  5:20   ` Andrew Morton
2007-01-15  7:26     ` Serge E. Hallyn
2007-01-15 15:03       ` Cedric Le Goater
2007-01-15 15:28         ` Serge E. Hallyn
2007-01-15 17:35           ` Cedric Le Goater
2007-01-16 11:04             ` [PATCH -mm] user_ns: remove CONFIG_USER_NS Cedric Le Goater
2007-01-16 14:53               ` Serge E. Hallyn [this message]
2007-01-04 18:13 ` [PATCH -mm 8/8] user ns: implement user ns unshare Serge E. Hallyn
2007-01-04 19:07   ` Frederik Deweerdt
2007-01-04 19:43     ` Serge E. Hallyn
2007-01-04 22:03       ` Andrew Morton
2007-01-04 22:07         ` Andrew Morton
2007-01-04 22:23     ` Valdis.Kletnieks
2007-01-04 22:52       ` Serge E. Hallyn
2007-01-05  2:02         ` Valdis.Kletnieks
2007-01-05  4:35           ` Serge E. Hallyn
2007-01-05  4:03 ` [PATCH -mm 0/8] user ns: Introduction Andrew Morton
2007-01-05  5:43   ` Serge E. Hallyn
2007-01-05  7:00     ` Serge E. Hallyn

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=20070116145312.GB28253@sergelap.austin.ibm.com \
    --to=serue@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=clg@fr.ibm.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®