Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d69a1f4 authored by Cedric Le Goater's avatar Cedric Le Goater Committed by Linus Torvalds
Browse files

remove CONFIG_UTS_NS and CONFIG_IPC_NS



CONFIG_UTS_NS and CONFIG_IPC_NS have very little value as they only
deactivate the unshare of the uts and ipc namespaces and do not improve
performance.

Signed-off-by: default avatarCedric Le Goater <clg@fr.ibm.com>
Acked-by: default avatar"Serge E. Hallyn" <serue@us.ibm.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Pavel Emelianov <xemul@openvz.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 522ed776
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ extern struct ipc_namespace init_ipc_ns;

#ifdef CONFIG_SYSVIPC
#define INIT_IPC_NS(ns)		.ns		= &init_ipc_ns,
extern void free_ipc_ns(struct kref *kref);
extern struct ipc_namespace *copy_ipcs(unsigned long flags,
						struct ipc_namespace *ns);
#else
@@ -104,13 +105,9 @@ static inline struct ipc_namespace *copy_ipcs(unsigned long flags,
}
#endif

#ifdef CONFIG_IPC_NS
extern void free_ipc_ns(struct kref *kref);
#endif

static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
{
#ifdef CONFIG_IPC_NS
#ifdef CONFIG_SYSVIPC
	if (ns)
		kref_get(&ns->kref);
#endif
@@ -119,7 +116,7 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)

static inline void put_ipc_ns(struct ipc_namespace *ns)
{
#ifdef CONFIG_IPC_NS
#ifdef CONFIG_SYSVIPC
	kref_put(&ns->kref, free_ipc_ns);
#endif
}
@@ -127,5 +124,3 @@ static inline void put_ipc_ns(struct ipc_namespace *ns)
#endif /* __KERNEL__ */

#endif /* _LINUX_IPC_H */

+0 −13
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ static inline void get_uts_ns(struct uts_namespace *ns)
	kref_get(&ns->kref);
}

#ifdef CONFIG_UTS_NS
extern struct uts_namespace *copy_utsname(int flags, struct uts_namespace *ns);
extern void free_uts_ns(struct kref *kref);

@@ -56,18 +55,6 @@ static inline void put_uts_ns(struct uts_namespace *ns)
{
	kref_put(&ns->kref, free_uts_ns);
}
#else
static inline struct uts_namespace *copy_utsname(int flags,
						struct uts_namespace *ns)
{
	return ns;
}

static inline void put_uts_ns(struct uts_namespace *ns)
{
}
#endif

static inline struct new_utsname *utsname(void)
{
	return &current->nsproxy->uts_ns->name;
+0 −17
Original line number Diff line number Diff line
@@ -120,15 +120,6 @@ config SYSVIPC
	  section 6.4 of the Linux Programmer's Guide, available from
	  <http://www.tldp.org/guides.html>.

config IPC_NS
	bool "IPC Namespaces"
	depends on SYSVIPC
	default n
	help
	  Support ipc namespaces.  This allows containers, i.e. virtual
	  environments, to use ipc namespaces to provide different ipc
	  objects for different servers.  If unsure, say N.

config SYSVIPC_SYSCTL
	bool
	depends on SYSVIPC
@@ -218,14 +209,6 @@ config TASK_IO_ACCOUNTING

	  Say N if unsure.

config UTS_NS
	bool "UTS Namespaces"
	default n
	help
	  Support uts namespaces.  This allows containers, i.e.
	  vservers, to use uts namespaces to provide different
	  uts info for different servers.  If unsure, say N.

config AUDIT
	bool "Auditing support"
	depends on NET
+1 −3
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ static int newque (struct ipc_namespace *ns, key_t key, int msgflg);
static int sysvipc_msg_proc_show(struct seq_file *s, void *it);
#endif

static void __ipc_init __msg_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids)
static void __msg_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids)
{
	ns->ids[IPC_MSG_IDS] = ids;
	ns->msg_ctlmax = MSGMAX;
@@ -96,7 +96,6 @@ static void __ipc_init __msg_init_ns(struct ipc_namespace *ns, struct ipc_ids *i
	ipc_init_ids(ids, ns->msg_ctlmni);
}

#ifdef CONFIG_IPC_NS
int msg_init_ns(struct ipc_namespace *ns)
{
	struct ipc_ids *ids;
@@ -128,7 +127,6 @@ void msg_exit_ns(struct ipc_namespace *ns)
	kfree(ns->ids[IPC_MSG_IDS]);
	ns->ids[IPC_MSG_IDS] = NULL;
}
#endif

void __init msg_init(void)
{
+1 −3
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ static int sysvipc_sem_proc_show(struct seq_file *s, void *it);
#define sc_semopm	sem_ctls[2]
#define sc_semmni	sem_ctls[3]

static void __ipc_init __sem_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids)
static void __sem_init_ns(struct ipc_namespace *ns, struct ipc_ids *ids)
{
	ns->ids[IPC_SEM_IDS] = ids;
	ns->sc_semmsl = SEMMSL;
@@ -132,7 +132,6 @@ static void __ipc_init __sem_init_ns(struct ipc_namespace *ns, struct ipc_ids *i
	ipc_init_ids(ids, ns->sc_semmni);
}

#ifdef CONFIG_IPC_NS
int sem_init_ns(struct ipc_namespace *ns)
{
	struct ipc_ids *ids;
@@ -164,7 +163,6 @@ void sem_exit_ns(struct ipc_namespace *ns)
	kfree(ns->ids[IPC_SEM_IDS]);
	ns->ids[IPC_SEM_IDS] = NULL;
}
#endif

void __init sem_init (void)
{
Loading