Skip to content

Commit

Permalink
Merge pull request #608 from jpoimboe/ipmodify
Browse files Browse the repository at this point in the history
kmod/core: use FTRACE_OPS_FL_IPMODIFY flag
  • Loading branch information
Jessica Yu authored Aug 19, 2016
2 parents c305c0b + 3c7300c commit 835fc04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kmod/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,13 @@ kpatch_ftrace_handler(unsigned long ip, unsigned long parent_ip,
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 = {
.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)
Expand Down

0 comments on commit 835fc04

Please sign in to comment.