Commit 8bf83486 authored by Zheng Yejian's avatar Zheng Yejian Committed by Zheng Zengkai
Browse files

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: default avatarZheng Yejian <zhengyejian1@huawei.com>
Reviewed-by: default avatarKuohai Xu <xukuohai@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 1f8a38ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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);