Commit 3d5a4d13 authored by Zheng Zengkai's avatar Zheng Zengkai
Browse files

KABI: add KABI padding to x86/paravirt ops structures

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4JBL0


CVE: NA

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

Although CONFIG_PARAVIRT_XXL is not enabled in openeuler_defconfig,
we add KABI padding to the following x86/paravirt ops structures
in advance for potential kabi break:

    pv_irq_ops
    pv_mmu_ops
    pv_lock_ops

Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Reviewed-by: default avatarCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 14f70b7a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -194,6 +194,9 @@ struct pv_irq_ops {

	void (*safe_halt)(void);
	void (*halt)(void);

	KABI_RESERVE(1)
	KABI_RESERVE(2)
#endif
} __no_randomize_layout;

@@ -280,6 +283,10 @@ struct pv_mmu_ops {
	   an mfn.  We can tell which is which from the index. */
	void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
			   phys_addr_t phys, pgprot_t flags);
	KABI_RESERVE(1)
	KABI_RESERVE(2)
	KABI_RESERVE(3)
	KABI_RESERVE(4)
#endif
} __no_randomize_layout;

@@ -298,6 +305,8 @@ struct pv_lock_ops {
	void (*kick)(int cpu);

	struct paravirt_callee_save vcpu_is_preempted;

	KABI_RESERVE(1)
} __no_randomize_layout;

/* This contains all the paravirt structures: we get a convenient