Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3edacbd authored by David S. Miller's avatar David S. Miller
Browse files

bpf: Revert bpf_overrid_function() helper changes.



NACK'd by x86 maintainer.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bee955cd
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -196,9 +196,6 @@ config HAVE_OPTPROBES
config HAVE_KPROBES_ON_FTRACE
	bool

config HAVE_KPROBE_OVERRIDE
	bool

config HAVE_NMI
	bool

+0 −1
Original line number Diff line number Diff line
@@ -153,7 +153,6 @@ config X86
	select HAVE_KERNEL_XZ
	select HAVE_KPROBES
	select HAVE_KPROBES_ON_FTRACE
	select HAVE_KPROBE_OVERRIDE
	select HAVE_KRETPROBES
	select HAVE_KVM
	select HAVE_LIVEPATCH			if X86_64
+0 −4
Original line number Diff line number Diff line
@@ -67,10 +67,6 @@ extern const int kretprobe_blacklist_size;
void arch_remove_kprobe(struct kprobe *p);
asmlinkage void kretprobe_trampoline(void);

#ifdef CONFIG_KPROBES_ON_FTRACE
extern void arch_ftrace_kprobe_override_function(struct pt_regs *regs);
#endif

/* Architecture specific copy of original instruction*/
struct arch_specific_insn {
	/* copy of the original instruction */
+0 −5
Original line number Diff line number Diff line
@@ -109,11 +109,6 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)
	return regs->ax;
}

static inline void regs_set_return_value(struct pt_regs *regs, unsigned long rc)
{
	regs->ax = rc;
}

/*
 * user_mode(regs) determines whether a register set came from user
 * mode.  On x86_32, this is true if V8086 mode was enabled OR if the
+0 −14
Original line number Diff line number Diff line
@@ -97,17 +97,3 @@ int arch_prepare_kprobe_ftrace(struct kprobe *p)
	p->ainsn.boostable = false;
	return 0;
}

asmlinkage void override_func(void);
asm(
	".type override_func, @function\n"
	"override_func:\n"
	"	ret\n"
	".size override_func, .-override_func\n"
);

void arch_ftrace_kprobe_override_function(struct pt_regs *regs)
{
	regs->ip = (unsigned long)&override_func;
}
NOKPROBE_SYMBOL(arch_ftrace_kprobe_override_function);
Loading