173d6eb48SIlya Leoshkevich // SPDX-License-Identifier: GPL-2.0+ 273d6eb48SIlya Leoshkevich #include <asm/ptrace.h> 373d6eb48SIlya Leoshkevich #include <linux/error-injection.h> 473d6eb48SIlya Leoshkevich #include <linux/kprobes.h> 573d6eb48SIlya Leoshkevich override_function_with_return(struct pt_regs * regs)673d6eb48SIlya Leoshkevichvoid override_function_with_return(struct pt_regs *regs) 773d6eb48SIlya Leoshkevich { 873d6eb48SIlya Leoshkevich /* 973d6eb48SIlya Leoshkevich * Emulate 'br 14'. 'regs' is captured by kprobes on entry to some 1073d6eb48SIlya Leoshkevich * kernel function. 1173d6eb48SIlya Leoshkevich */ 1273d6eb48SIlya Leoshkevich regs->psw.addr = regs->gprs[14]; 1373d6eb48SIlya Leoshkevich } 1473d6eb48SIlya Leoshkevich NOKPROBE_SYMBOL(override_function_with_return); 15