提交 40f483c7 编写于 作者: L Lu Jialin 提交者: Zheng Zengkai

kabi: reserve space for cgroup framework related structures

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4GII8?from=project-issue
CVE: NA

--------

We reserve some fields beforehand for cgroup framework related structures prone
to change, therefore, we can hot add/change features of cgroupv1/cgroupv2 with
this enhancement.

After reserving, normally cache does not matter as the reserved fields
are not accessed at all.

---------
Signed-off-by: NLu Jialin <lujialin4@huawei.com>
Reviewed-by: Nweiyang wang <wangweiyang2@huawei.com>
Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 56f99a05
......@@ -21,6 +21,7 @@
#include <linux/workqueue.h>
#include <linux/bpf-cgroup.h>
#include <linux/psi_types.h>
#include <linux/kabi.h>
#ifdef CONFIG_CGROUPS
......@@ -126,6 +127,9 @@ struct cgroup_file {
struct kernfs_node *kn;
unsigned long notified_at;
struct timer_list notify_timer;
KABI_RESERVE(1)
KABI_RESERVE(2)
};
/*
......@@ -183,6 +187,11 @@ struct cgroup_subsys_state {
* fields of the containing structure.
*/
struct cgroup_subsys_state *parent;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
/*
......@@ -279,6 +288,11 @@ struct css_set {
/* For RCU-protected deletion */
struct rcu_head rcu_head;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
struct cgroup_base_stat {
......@@ -482,6 +496,10 @@ struct cgroup {
/* Used to store internal freezer state */
struct cgroup_freezer_state freezer;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
/* ids of the ancestors at each level including self */
u64 ancestor_ids[];
};
......@@ -523,6 +541,11 @@ struct cgroup_root {
/* The name for this hierarchy - may be empty */
char name[MAX_CGROUP_ROOT_NAMELEN];
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
/*
......@@ -618,6 +641,8 @@ struct cftype {
__poll_t (*poll)(struct kernfs_open_file *of,
struct poll_table_struct *pt);
KABI_RESERVE(1)
#ifdef CONFIG_DEBUG_LOCK_ALLOC
struct lock_class_key lockdep_key;
#endif
......@@ -650,6 +675,10 @@ struct cgroup_subsys {
void (*release)(struct task_struct *task);
void (*bind)(struct cgroup_subsys_state *root_css);
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
bool early_init:1;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册