提交 3d5a4d13 编写于 作者: Z Zheng Zengkai

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: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Reviewed-by: NCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 14f70b7a
...@@ -194,6 +194,9 @@ struct pv_irq_ops { ...@@ -194,6 +194,9 @@ struct pv_irq_ops {
void (*safe_halt)(void); void (*safe_halt)(void);
void (*halt)(void); void (*halt)(void);
KABI_RESERVE(1)
KABI_RESERVE(2)
#endif #endif
} __no_randomize_layout; } __no_randomize_layout;
...@@ -280,6 +283,10 @@ struct pv_mmu_ops { ...@@ -280,6 +283,10 @@ struct pv_mmu_ops {
an mfn. We can tell which is which from the index. */ an mfn. We can tell which is which from the index. */
void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx, void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
phys_addr_t phys, pgprot_t flags); phys_addr_t phys, pgprot_t flags);
KABI_RESERVE(1)
KABI_RESERVE(2)
KABI_RESERVE(3)
KABI_RESERVE(4)
#endif #endif
} __no_randomize_layout; } __no_randomize_layout;
...@@ -298,6 +305,8 @@ struct pv_lock_ops { ...@@ -298,6 +305,8 @@ struct pv_lock_ops {
void (*kick)(int cpu); void (*kick)(int cpu);
struct paravirt_callee_save vcpu_is_preempted; struct paravirt_callee_save vcpu_is_preempted;
KABI_RESERVE(1)
} __no_randomize_layout; } __no_randomize_layout;
/* This contains all the paravirt structures: we get a convenient /* This contains all the paravirt structures: we get a convenient
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册