Merge pull request #608 from jpoimboe/ipmodify

kmod/core: use FTRACE_OPS_FL_IPMODIFY flag
This commit is contained in:
Jessica Yu 2016-08-19 10:33:07 -07:00 committed by GitHub
commit 835fc0474f

View File

@ -515,9 +515,13 @@ done:
preempt_enable_notrace(); preempt_enable_notrace();
} }
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
#define FTRACE_OPS_FL_IPMODIFY 0
#endif
static struct ftrace_ops kpatch_ftrace_ops __read_mostly = { static struct ftrace_ops kpatch_ftrace_ops __read_mostly = {
.func = kpatch_ftrace_handler, .func = kpatch_ftrace_handler,
.flags = FTRACE_OPS_FL_SAVE_REGS, .flags = FTRACE_OPS_FL_SAVE_REGS | FTRACE_OPS_FL_IPMODIFY,
}; };
static int kpatch_ftrace_add_func(unsigned long ip) static int kpatch_ftrace_add_func(unsigned long ip)