diff options
Diffstat (limited to 'arch/riscv/lib/error-inject.c')
-rw-r--r-- | arch/riscv/lib/error-inject.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/riscv/lib/error-inject.c b/arch/riscv/lib/error-inject.c new file mode 100644 index 000000000..d667ade2b --- /dev/null +++ b/arch/riscv/lib/error-inject.c @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <linux/error-injection.h> +#include <linux/kprobes.h> + +void override_function_with_return(struct pt_regs *regs) +{ + instruction_pointer_set(regs, regs->ra); +} +NOKPROBE_SYMBOL(override_function_with_return); |