Commit 4187d63d authored by Chen Ridong's avatar Chen Ridong Committed by yanhaitao
Browse files

namespace: kabi: reserve for future namespace development

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8SA3O



----------------------------------------------------------------------

Reserve KABI for future namespace development.

Signed-off-by: default avatarChen Ridong <chenridong@huawei.com>
parent 5e51524e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@

#include <linux/spinlock.h>
#include <linux/sched.h>
#include <linux/kabi.h>

struct mnt_namespace;
struct uts_namespace;
@@ -38,6 +39,9 @@ struct nsproxy {
	struct time_namespace *time_ns;
	struct time_namespace *time_ns_for_children;
	struct cgroup_namespace *cgroup_ns;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
};
extern struct nsproxy init_nsproxy;

+4 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#include <linux/nsproxy.h>
#include <linux/ns_common.h>
#include <linux/idr.h>
#include <linux/kabi.h>

/* MAX_PID_NS_LEVEL is needed for limiting size of 'struct pid' */
#define MAX_PID_NS_LEVEL 32
@@ -44,6 +45,9 @@ struct pid_namespace {
#if defined(CONFIG_SYSCTL) && defined(CONFIG_MEMFD_CREATE)
	int memfd_noexec_scope;
#endif
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
} __randomize_layout;

extern struct pid_namespace init_pid_ns;
+7 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#include <linux/rwsem.h>
#include <linux/sysctl.h>
#include <linux/err.h>
#include <linux/kabi.h>

#define UID_GID_MAP_MAX_BASE_EXTENTS 5
#define UID_GID_MAP_MAX_EXTENTS 340
@@ -54,6 +55,9 @@ enum ucount_type {
	UCOUNT_FANOTIFY_GROUPS,
	UCOUNT_FANOTIFY_MARKS,
#endif
	UCOUNT_KABI_RESERVE1,
	UCOUNT_KABI_RESERVE2,
	UCOUNT_KABI_RESERVE3,
	UCOUNT_COUNTS,
};

@@ -102,6 +106,9 @@ struct user_namespace {
	struct ucounts		*ucounts;
	long ucount_max[UCOUNT_COUNTS];
	long rlimit_max[UCOUNT_RLIMIT_COUNTS];
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
} __randomize_layout;

struct ucounts {
+4 −0
Original line number Diff line number Diff line
@@ -87,6 +87,10 @@ static struct ctl_table user_table[] = {
	UCOUNT_ENTRY("max_fanotify_groups"),
	UCOUNT_ENTRY("max_fanotify_marks"),
#endif
	/* These corresponds to the reservation in enum ucount_type */
	{ }, // UCOUNT_KABI_RESERVE1
	{ }, // UCOUNT_KABI_RESERVE2
	{ }, // UCOUNT_KABI_RESERVE3
	{ }
};
#endif /* CONFIG_SYSCTL */