提交 ceff8692 编写于 作者: C Cheng Jian 提交者: Yang Yingliang

livepatch/core: fix kabi for klp_rel_state

hulk inclusion
category: feature
bugzilla: 5391/28338/24634
CVE: NA

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

The previous patch added a field klp_rel_state in the
module structure, which caused KABI changes, so fix
this problem
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 4a7e5316
...@@ -469,19 +469,6 @@ struct module { ...@@ -469,19 +469,6 @@ struct module {
/* Elf information */ /* Elf information */
struct klp_modinfo *klp_info; struct klp_modinfo *klp_info;
/*
* livepatch should relocate the key of jump_label by
* using klp_write_module_reloc. So it's necessary to
* do jump_label_apply_nops() and jump_label_add_module()
* later after livepatch relocation finised.
*
* for normal module :
* always MODULE_KLP_REL_DONE.
* for livepatch module :
* init as MODULE_KLP_REL_UNDO,
* set to MODULE_KLP_REL_DONE when relocate completed.
*/
enum MODULE_KLP_REL_STATE klp_rel_state;
#endif #endif
#ifdef CONFIG_MODULE_UNLOAD #ifdef CONFIG_MODULE_UNLOAD
...@@ -507,7 +494,27 @@ struct module { ...@@ -507,7 +494,27 @@ struct module {
unsigned int num_ei_funcs; unsigned int num_ei_funcs;
#endif #endif
#if defined(CONFIG_LIVEPATCH) && !defined(__GENKSYMS__)
union {
/*
* livepatch should relocate the key of jump_label by
* using klp_write_module_reloc. So it's necessary to
* do jump_label_apply_nops() and jump_label_add_module()
* later after livepatch relocation finised.
*
* for normal module :
* always MODULE_KLP_REL_DONE.
* for livepatch module :
* init as MODULE_KLP_REL_UNDO,
* set to MODULE_KLP_REL_DONE when relocate completed.
*/
enum MODULE_KLP_REL_STATE klp_rel_state;
long klp_rel_state_KABI;
};
#else
KABI_RESERVE(1) KABI_RESERVE(1)
#endif
KABI_RESERVE(2) KABI_RESERVE(2)
KABI_RESERVE(3) KABI_RESERVE(3)
KABI_RESERVE(4) KABI_RESERVE(4)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册