Assuming that struct thread_struct won't be accessed directly by drivers, Using __GENKSYMS__ macro to avoid kabi change caused by commit 9782a712eb97 ("x86/fpu: Add PKRU storage outside of task XSAVE buffer").
Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- arch/x86/include/asm/processor.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 008237b10e1f..765f4dbc9a7a 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -534,6 +534,7 @@ struct thread_struct { unsigned int iopl_warn:1; unsigned int sig_on_uaccess_err:1;
+#ifndef __GENKSYMS__ /* * Protection Keys Register for Userspace. Loaded immediately on * context switch. Store it in thread_struct to avoid a lookup in @@ -542,6 +543,7 @@ struct thread_struct { * PKRU is the hardware itself. */ u32 pkru; +#endif
/* Floating point and extended processor state */ struct fpu fpu;