Commit 79ace031 authored by Jason Zeng's avatar Jason Zeng
Browse files

x86: Add x86 related kabi reservations

Intel inclusion
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8SMQ1


CVE: NA

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

Add x86 related kabi reservations.

Signed-off-by: default avatarJason Zeng <jason.zeng@intel.com>
parent f31cd96b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -245,6 +245,9 @@ extern void __init check_x2apic(void);

struct irq_data;

struct apic_resvd {
};

/*
 * Copyright 2004 James Cleverdon, IBM.
 *
@@ -307,6 +310,7 @@ struct apic {
	int	(*wakeup_secondary_cpu_64)(int apicid, unsigned long start_eip);

	char	*name;
	KABI_AUX_EMBED(apic)
};

struct apic_override {
+5 −1
Original line number Diff line number Diff line
@@ -17,6 +17,9 @@
/* Allow LAM and SVA coexisting */
#define MM_CONTEXT_FORCE_TAGGED_SVA	3

struct mm_context_resvd {
};

/*
 * x86 has arch-specific MMU state beyond what lives in mm_struct.
 */
@@ -56,7 +59,7 @@ typedef struct {

	struct mutex lock;
	void __user *vdso;			/* vdso base address */
	const struct vdso_image *vdso_image;	/* vdso image in use */
	KABI_EXCLUDE(const struct vdso_image *vdso_image)	/* vdso image in use */

	atomic_t perf_rdpmc_allowed;	/* nonzero if rdpmc is allowed */
#ifdef CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
@@ -67,6 +70,7 @@ typedef struct {
	u16 pkey_allocation_map;
	s16 execute_only_pkey;
#endif
	KABI_AUX_EMBED(mm_context)
} mm_context_t;

#define INIT_MM_CONTEXT(mm)						\
+11 −1
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ struct vm86;
#include <linux/irqflags.h>
#include <linux/mem_encrypt.h>

#include <linux/kabi.h>

/*
 * We handle most unaligned accesses in hardware.  On the other hand
 * unaligned DMA can be quite expensive on some Nehalem processors.
@@ -74,6 +76,9 @@ extern u16 __read_mostly tlb_lld_2m[NR_INFO];
extern u16 __read_mostly tlb_lld_4m[NR_INFO];
extern u16 __read_mostly tlb_lld_1g[NR_INFO];

struct cpuinfo_x86_resvd {
};

/*
 *  CPU type and hardware bug flags. Kept separately for each CPU.
 *  Members of this structure are referenced in head_32.S, so think twice
@@ -146,6 +151,11 @@ struct cpuinfo_x86 {
	/* Address space bits used by the cache internally */
	u8			x86_cache_bits;
	unsigned		initialized : 1;
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
	KABI_AUX_EMBED(cpuinfo_x86)
} __randomize_layout;

#define X86_VENDOR_INTEL	0
@@ -483,7 +493,7 @@ struct thread_struct {
#endif

	/* Floating point and extended processor state */
	struct fpu		fpu;
	KABI_EXCLUDE(struct fpu		fpu)
	/*
	 * WARNING: 'fpu' is dynamically-sized.  It *MUST* be at
	 * the end.
+4 −0
Original line number Diff line number Diff line
@@ -25,6 +25,9 @@ DECLARE_EARLY_PER_CPU_READ_MOSTLY(u32, x86_cpu_to_acpiid);

struct task_struct;

struct smp_ops_resvd {
};

struct smp_ops {
	void (*smp_prepare_boot_cpu)(void);
	void (*smp_prepare_cpus)(unsigned max_cpus);
@@ -43,6 +46,7 @@ struct smp_ops {

	void (*send_call_func_ipi)(const struct cpumask *mask);
	void (*send_call_func_single_ipi)(int cpu);
	KABI_AUX_EMBED(smp_ops)
};

/* Globals due to paravirt */
+6 −0
Original line number Diff line number Diff line
@@ -13,6 +13,8 @@
#include <linux/mm_types.h>
#include <asm/ptrace.h>

#include <linux/kabi.h>

/*
 * Types defining task->signal and task->sighand and APIs using them:
 */
@@ -245,6 +247,10 @@ struct signal_struct {
						 * and may have inconsistent
						 * permissions.
						 */
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
} __randomize_layout;

/*