提交 8bf83486 编写于 作者: Z Zheng Yejian 提交者: Zheng Zengkai

livepatch/x86: Rename old_code to old_insns

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60L10
CVE: NA

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

In arm/arm64/ppc32/ppc64, this field is named as old_insns, so uniform it.
Signed-off-by: NZheng Yejian <zhengyejian1@huawei.com>
Reviewed-by: NKuohai Xu <xukuohai@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 1f8a38ca
......@@ -36,7 +36,7 @@ int klp_check_calltrace(struct klp_patch *patch, int enable);
#define JMP_E9_INSN_SIZE 5
struct arch_klp_data {
unsigned char old_code[JMP_E9_INSN_SIZE];
unsigned char old_insns[JMP_E9_INSN_SIZE];
#ifdef CONFIG_LIVEPATCH_STOP_MACHINE_CONSISTENCY
/*
* Saved opcode at the entry of the old func (which maybe replaced
......
......@@ -483,7 +483,7 @@ long arch_klp_save_old_code(struct arch_klp_data *arch_data, void *old_func)
/* Prevent text modification */
mutex_lock(&text_mutex);
ret = copy_from_kernel_nofault(arch_data->old_code,
ret = copy_from_kernel_nofault(arch_data->old_insns,
old_func, JMP_E9_INSN_SIZE);
mutex_unlock(&text_mutex);
......@@ -525,7 +525,7 @@ void arch_klp_unpatch_func(struct klp_func *func)
ip = (unsigned long)func_node->old_func;
list_del_rcu(&func->stack_node);
if (list_empty(&func_node->func_stack)) {
new = func_node->arch_data.old_code;
new = func_node->arch_data.old_insns;
} else {
next_func = list_first_or_null_rcu(&func_node->func_stack,
struct klp_func, stack_node);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册