提交 e202760d 编写于 作者: T Tan Xiaojun 提交者: Xie XiuQi

kabi: reserve space for schedule subsystem related structure

hulk inclusion
category: feature
bugzilla: 13276
CVE: NA

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

Reserve space for the structure in schedule subsystem.
Signed-off-by: NTan Xiaojun <tanxiaojun@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 0a7866f7
......@@ -478,6 +478,11 @@ struct sched_entity {
*/
struct sched_avg avg;
#endif
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
struct sched_rt_entity {
......@@ -1199,6 +1204,15 @@ struct task_struct {
*/
randomized_struct_fields_end
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
KABI_RESERVE(5)
KABI_RESERVE(6)
KABI_RESERVE(7)
KABI_RESERVE(8)
/* CPU-specific state of this task: */
struct thread_struct thread;
......
......@@ -2,6 +2,7 @@
#ifndef _LINUX_SCHED_SIGNAL_H
#define _LINUX_SCHED_SIGNAL_H
#include <linux/kabi.h>
#include <linux/rculist.h>
#include <linux/signal.h>
#include <linux/sched.h>
......@@ -232,6 +233,11 @@ struct signal_struct {
struct mutex cred_guard_mutex; /* guard against foreign influences on
* credential calculations
* (notably. ptrace) */
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
} __randomize_layout;
/*
......
......@@ -2,6 +2,7 @@
#ifndef _LINUX_SCHED_USER_H
#define _LINUX_SCHED_USER_H
#include <linux/kabi.h>
#include <linux/uidgid.h>
#include <linux/atomic.h>
#include <linux/refcount.h>
......@@ -46,6 +47,9 @@ struct user_struct {
/* Miscellaneous per-user rate limit */
struct ratelimit_state ratelimit;
KABI_RESERVE(1)
KABI_RESERVE(2)
};
extern int uids_sysfs_init(void);
......
......@@ -64,6 +64,7 @@
#include <linux/syscalls.h>
#include <linux/task_work.h>
#include <linux/tsacct_kern.h>
#include <linux/kabi.h>
#include <asm/tlb.h>
......@@ -392,6 +393,9 @@ struct task_group {
#endif
struct cfs_bandwidth cfs_bandwidth;
KABI_RESERVE(1)
KABI_RESERVE(2)
};
#ifdef CONFIG_FAIR_GROUP_SCHED
......@@ -567,6 +571,9 @@ struct cfs_rq {
struct list_head throttled_list;
#endif /* CONFIG_CFS_BANDWIDTH */
#endif /* CONFIG_FAIR_GROUP_SCHED */
KABI_RESERVE(1)
KABI_RESERVE(2)
};
static inline int rt_bandwidth_enabled(void)
......@@ -751,6 +758,11 @@ struct root_domain {
struct cpupri cpupri;
unsigned long max_cpu_capacity;
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
};
extern struct root_domain def_root_domain;
......@@ -917,6 +929,9 @@ struct rq {
/* Must be inspected within a rcu lock section */
struct cpuidle_state *idle_state;
#endif
KABI_RESERVE(1)
KABI_RESERVE(2)
};
struct cputime {
......@@ -1227,6 +1242,9 @@ struct sched_group {
struct sched_group_capacity *sgc;
int asym_prefer_cpu; /* CPU of highest priority in group */
KABI_RESERVE(1)
KABI_RESERVE(2)
/*
* The CPUs this group covers.
*
......@@ -1575,6 +1593,9 @@ struct sched_class {
#ifdef CONFIG_FAIR_GROUP_SCHED
void (*task_change_group)(struct task_struct *p, int type);
#endif
KABI_RESERVE(1)
KABI_RESERVE(2)
};
static inline void put_prev_task(struct rq *rq, struct task_struct *prev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册