Commit 7ef131ba authored by Lu Jialin's avatar Lu Jialin Committed by Zheng Zengkai
Browse files

kabi: reserve space for cpu cgroup and cpuset cgroup 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 cpu cgroup and cpuset related structures
prone to change, therefore, we can hot add/change features of cpu cgroup cpuset
and cgroup with this enhancement.

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

--------

Signed-off-by: default avatarLu Jialin <lujialin4@huawei.com>
Reviewed-by: default avatarChen Hui <judy.chenhui@huawei.com>
Reviewed-by: default avatarweiyang wang <wangweiyang2@huawei.com>
Reviewed-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 283fde80
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@
#include <linux/mutex.h>
#include <linux/cgroup.h>
#include <linux/wait.h>
#include <linux/kabi.h>

DEFINE_STATIC_KEY_FALSE(cpusets_pre_enable_key);
DEFINE_STATIC_KEY_FALSE(cpusets_enabled_key);
@@ -160,6 +161,11 @@ struct cpuset {
	 */
	int use_parent_ecpus;
	int child_ecpus_count;

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
};

/*
+5 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@
#include <linux/syscalls.h>
#include <linux/task_work.h>
#include <linux/tsacct_kern.h>
#include <linux/kabi.h>

#include <asm/tlb.h>
#include <asm-generic/vmlinux.lds.h>
@@ -440,6 +441,10 @@ struct task_group {
	struct uclamp_se	uclamp[UCLAMP_CNT];
#endif

	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
};

#ifdef CONFIG_FAIR_GROUP_SCHED