提交 ad307c6f 编写于 作者: Z Zheng Zengkai 提交者: Aichun Shi

x86: Avoid kabi change caused by adding pkru element in thread_struct

category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5RQLJ
CVE: NA

Intel-SIG: x86: Avoid kabi change caused by adding pkru element in thread_struct.

--------------------------------
Assuming that struct thread_struct won't be accessed directly by drivers,
Using KABI_BROKEN_INSERT macro to avoid kabi change caused by commit 9782a712
("x86/fpu: Add PKRU storage outside of task XSAVE buffer").
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Signed-off-by: NLin Wang <lin.x.wang@intel.com>
Signed-off-by: NAichun Shi <aichun.shi@intel.com>
上级 c98b1305
......@@ -35,6 +35,7 @@ struct vm86;
#include <linux/err.h>
#include <linux/irqflags.h>
#include <linux/mem_encrypt.h>
#include <linux/kabi.h>
/*
* We handle most unaligned accesses in hardware. On the other hand
......@@ -550,6 +551,7 @@ struct thread_struct {
unsigned int iopl_warn:1;
unsigned int sig_on_uaccess_err:1;
#ifdef CONFIG_X86_64
/*
* Protection Keys Register for Userspace. Loaded immediately on
* context switch. Store it in thread_struct to avoid a lookup in
......@@ -557,7 +559,8 @@ struct thread_struct {
* task is scheduled out. For 'current' the authoritative source of
* PKRU is the hardware itself.
*/
u32 pkru;
KABI_BROKEN_INSERT(u32 pkru)
#endif
/* Floating point and extended processor state */
struct fpu fpu;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册