1 // SPDX-License-Identifier: GPL-2.0
3 #include <linux/linkage.h>
4 #include <linux/error-injection.h>
5 #include <linux/kprobes.h>
7 asmlinkage void just_return_func(void);
11 ".type just_return_func, @function\n"
12 ".globl just_return_func\n"
15 ".size just_return_func, .-just_return_func\n"
18 void override_function_with_return(struct pt_regs *regs)
20 regs->ip = (unsigned long)&just_return_func;
22 NOKPROBE_SYMBOL(override_function_with_return);