summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/error-inject.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/lib/error-inject.c')
-rw-r--r--arch/arm/lib/error-inject.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/lib/error-inject.c b/arch/arm/lib/error-inject.c
new file mode 100644
index 0000000000..5a5b405792
--- /dev/null
+++ b/arch/arm/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->ARM_lr);
+}
+NOKPROBE_SYMBOL(override_function_with_return);