Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 #include <asm/ptrace.h>
0003 #include <linux/error-injection.h>
0004 #include <linux/kprobes.h>
0005 
0006 void override_function_with_return(struct pt_regs *regs)
0007 {
0008     /*
0009      * Emulate 'br 14'. 'regs' is captured by kprobes on entry to some
0010      * kernel function.
0011      */
0012     regs->psw.addr = regs->gprs[14];
0013 }
0014 NOKPROBE_SYMBOL(override_function_with_return);