Commit 5dc1c380 authored by Zheng Yejian's avatar Zheng Yejian
Browse files

livepatch: Reduce duplicate definition of 'struct walk_stackframe_args'

hulk inclusion
category: cleanup
bugzilla: https://gitee.com/openeuler/kernel/issues/I9R2TB



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

Definition of 'struct walk_stackframe_args' are the same in
arm/arm64/powerpc32/powerpc64, so move it into
include/linux/livepatch.h.

Signed-off-by: default avatarZheng Yejian <zhengyejian1@huawei.com>
parent 418a3c13
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -63,12 +63,6 @@ static bool is_jump_insn(u32 insn)
	return false;
}

struct walk_stackframe_args {
	void *data;
	int ret;
	bool (*check_func)(void *data, int *ret, unsigned long pc);
};

bool arch_check_jump_insn(unsigned long func_addr)
{
	unsigned long i;
+0 −6
Original line number Diff line number Diff line
@@ -56,12 +56,6 @@ static inline bool offset_in_range(unsigned long pc, unsigned long addr,
		((le32_to_cpu(insn) & 0xfc000000) == 0x94000000) || \
		((le32_to_cpu(insn) & 0xfefff800) == 0xd63f0800))

struct walk_stackframe_args {
	void *data;
	int ret;
	bool (*check_func)(void *data, int *ret, unsigned long pc);
};

bool arch_check_jump_insn(unsigned long func_addr)
{
	unsigned long i;
+0 −6
Original line number Diff line number Diff line
@@ -53,12 +53,6 @@ static bool is_jump_insn(u32 insn)
	return false;
}

struct walk_stackframe_args {
	void *data;
	int ret;
	bool (*check_func)(void *data, int *ret, unsigned long pc);
};

bool arch_check_jump_insn(unsigned long func_addr)
{
	unsigned long i;
+0 −6
Original line number Diff line number Diff line
@@ -58,12 +58,6 @@ static bool is_jump_insn(u32 insn)
	return false;
}

struct walk_stackframe_args {
	void *data;
	int ret;
	bool (*check_func)(void *data, int *ret, unsigned long pc);
};

static bool check_jump_insn(unsigned long func_addr)
{
	unsigned long i;
+6 −0
Original line number Diff line number Diff line
@@ -260,6 +260,12 @@ typedef int (*klp_add_func_t)(struct list_head *func_list,
			       unsigned long func_addr, unsigned long func_size,
			       const char *func_name, int force);

struct walk_stackframe_args {
	void *data;
	int ret;
	bool (*check_func)(void *data, int *ret, unsigned long pc);
};

#endif

int klp_apply_section_relocs(struct module *pmod, Elf_Shdr *sechdrs,