提交 e8baff77 编写于 作者: G Guan Jing 提交者: Zheng Zengkai

KABI: add reserve space for thread_info struct

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

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

We reserve some fields beforehand for thread_info prone to change.
Signed-off-by: NGuan Jing <guanjing6@huawei.com>
Reviewed-by: NChen Hui <judy.chenhui@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 4d13e400
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <asm/fpstate.h> #include <asm/fpstate.h>
#include <asm/page.h> #include <asm/page.h>
#include <linux/kabi.h>
#ifdef CONFIG_KASAN #ifdef CONFIG_KASAN
/* /*
...@@ -73,6 +74,8 @@ struct thread_info { ...@@ -73,6 +74,8 @@ struct thread_info {
#ifdef CONFIG_ARM_THUMBEE #ifdef CONFIG_ARM_THUMBEE
unsigned long thumbee_state; /* ThumbEE Handler Base register */ unsigned long thumbee_state; /* ThumbEE Handler Base register */
#endif #endif
KABI_RESERVE(1)
KABI_RESERVE(2)
}; };
#define INIT_THREAD_INFO(tsk) \ #define INIT_THREAD_INFO(tsk) \
......
...@@ -17,6 +17,7 @@ struct task_struct; ...@@ -17,6 +17,7 @@ struct task_struct;
#include <asm/memory.h> #include <asm/memory.h>
#include <asm/stack_pointer.h> #include <asm/stack_pointer.h>
#include <asm/types.h> #include <asm/types.h>
#include <linux/kabi.h>
typedef unsigned long mm_segment_t; typedef unsigned long mm_segment_t;
...@@ -46,6 +47,9 @@ struct thread_info { ...@@ -46,6 +47,9 @@ struct thread_info {
void *scs_sp; void *scs_sp;
#endif #endif
u32 cpu; u32 cpu;
KABI_RESERVE(1)
KABI_RESERVE(2)
}; };
#define thread_saved_pc(tsk) \ #define thread_saved_pc(tsk) \
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/percpu.h> #include <asm/percpu.h>
#include <asm/types.h> #include <asm/types.h>
#include <linux/kabi.h>
/* /*
* TOP_OF_KERNEL_STACK_PADDING is a number of unused bytes that we * TOP_OF_KERNEL_STACK_PADDING is a number of unused bytes that we
...@@ -59,6 +60,8 @@ struct thread_info { ...@@ -59,6 +60,8 @@ struct thread_info {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
u32 cpu; /* current CPU */ u32 cpu; /* current CPU */
#endif #endif
KABI_RESERVE(1)
KABI_RESERVE(2)
}; };
#define INIT_THREAD_INFO(tsk) \ #define INIT_THREAD_INFO(tsk) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册