Re: [PATCH] kprobes: Fix possible warn in __arm_kprobe_ftrace()

2024-04-07 Thread Zheng Yejian
On 2024/4/8 10:50, Masami Hiramatsu (Google) wrote: On Sun, 7 Apr 2024 11:59:04 +0800 Zheng Yejian wrote: There is once warn in __arm_kprobe_ftrace() on: ret = ftrace_set_filter_ip(ops, (unsigned long)p->addr, 0, 0); if (WARN_ONCE(..., "Failed to arm kprobe-ftrace at %pS (error %d)\n",

Re: [PATCH] kprobes: Fix possible warn in __arm_kprobe_ftrace()

2024-04-07 Thread Google
On Sun, 7 Apr 2024 11:59:04 +0800 Zheng Yejian wrote: > There is once warn in __arm_kprobe_ftrace() on: > > ret = ftrace_set_filter_ip(ops, (unsigned long)p->addr, 0, 0); > if (WARN_ONCE(..., "Failed to arm kprobe-ftrace at %pS (error %d)\n", ...) >return ret; > > This warning is due to

[PATCH] kprobes: Fix possible warn in __arm_kprobe_ftrace()

2024-04-06 Thread Zheng Yejian
There is once warn in __arm_kprobe_ftrace() on: ret = ftrace_set_filter_ip(ops, (unsigned long)p->addr, 0, 0); if (WARN_ONCE(..., "Failed to arm kprobe-ftrace at %pS (error %d)\n", ...) return ret; This warning is due to 'p->addr' is not a valid ftrace_location and that invalid 'p->addr'