1 // SPDX-License-Identifier: GPL-2.0 1 2 3 #include <linux/error-injection.h> 4 #include <linux/kprobes.h> 5 6 void override_function_with_return(struct pt_r 7 { 8 /* 9 * 'regs' represents the state on entr 10 * the kernel/module and which is capt 11 * 12 * When kprobe returns back from excep 13 * of probed function and directly ret 14 * function's caller. 15 */ 16 instruction_pointer_set(regs, procedur 17 } 18 NOKPROBE_SYMBOL(override_function_with_return) 19
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.