hulk inclusion bugzilla: https://gitee.com/openeuler/kernel/issues/I4MZU1 CVE: NA
---------------------------
For x86 platform, make allmodconfig & make -j64, following two build errors are reported.
First error: - build failed: - In file included from <command-line>:32:0: ./usr/include/asm/bootparam.h:45:10: fatal error: linux/kabi.h: No such file or directory #include <linux/kabi.h> ^~~~~~~~~~~~~~ compilation terminated. make[2]: *** [usr/include/asm/bootparam.hdrtest] Error 1
Second error: ./arch/x86/include/asm/paravirt_types.h:198:2: error: expected specifier-qualifier-list before ‘KABI_RESERVE’ KABI_RESERVE(1) ^~~~~~~~~~~~ ./arch/x86/include/asm/paravirt_types.h:286:2: error: expected specifier-qualifier-list before ‘KABI_RESERVE’ KABI_RESERVE(1) ^~~~~~~~~~~~ ./arch/x86/include/asm/paravirt_types.h:309:2: error: expected specifier-qualifier-list before ‘KABI_RESERVE’ KABI_RESERVE(1) ^~~~~~~~~~~~ make[1]: *** [scripts/Makefile.build:117: arch/x86/kernel/asm-offsets.s] Error 1
To fix first error, reverts commit 3ba63bacfc bootparam: Add kabi_reserve in bootparam. To fix second error, add include file kabi.h to arch/x86/include/asm/paravirt_types.h.
Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- arch/x86/include/asm/paravirt_types.h | 2 ++ arch/x86/include/uapi/asm/bootparam.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index 98eb135b1888..17a2308ef3af 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -2,6 +2,8 @@ #ifndef _ASM_X86_PARAVIRT_TYPES_H #define _ASM_X86_PARAVIRT_TYPES_H
+#include <linux/kabi.h> + /* Bitmask of what can be clobbered: usually at least eax. */ #define CLBR_NONE 0 #define CLBR_EAX (1 << 0) diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h index b1dce768d073..600a141c8805 100644 --- a/arch/x86/include/uapi/asm/bootparam.h +++ b/arch/x86/include/uapi/asm/bootparam.h @@ -42,7 +42,6 @@ #include <linux/types.h> #include <linux/screen_info.h> #include <linux/apm_bios.h> -#include <linux/kabi.h> #include <linux/edd.h> #include <asm/ist.h> #include <video/edid.h> @@ -103,7 +102,6 @@ struct setup_header { __u32 init_size; __u32 handover_offset; __u32 kernel_info_offset; - KABI_RESERVE(1) } __attribute__((packed));
struct sys_desc_table {