From 3d5a4d13c22cff7348a2dc66ecc9363dc1fb0eb0 Mon Sep 17 00:00:00 2001 From: Zheng Zengkai Date: Fri, 31 Dec 2021 15:59:42 +0800 Subject: [PATCH] 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: Zheng Zengkai Reviewed-by: Yang Yingliang Reviewed-by: Wei Li Reviewed-by: Cheng Jian Signed-off-by: Zheng Zengkai --- arch/x86/include/asm/paravirt_types.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index ab4f17eb1cb2..98eb135b1888 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -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 -- GitLab