linux-next: build warning after merge of the ftrace tree
Hi all,
After merging the ftrace tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:
kernel/kprobes.c: In function 'kill_kprobe':kernel/kprobes.c:1116:33: warning: statement with no effect [-Wunused-value]
1116 | #define disarm_kprobe_ftrace(p) (-ENODEV)
| ^kernel/kprobes.c:2154:3: note: in expansion of macro 'disarm_kprobe_ftrace'
2154 | disarm_kprobe_ftrace(p);
| ^~~~~~~~~~~~~~~~~~~~Introduced by commit
0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler")
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 6 lines · Stephen Rothwell
Hi all,
After merging the ftrace tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
Quoted 8 lines
kernel/kprobes.c: In function 'kill_kprobe':kernel/kprobes.c:1116:33: warning: statement with no effect [-Wunused-value]
1116 | #definedisarm_kprobe_ftrace(p)(-ENODEV)
| ^kernel/kprobes.c:2154:3: note: in expansion of macro 'disarm_kprobe_ftrace'2154 | disarm_kprobe_ftrace(p); | ^~~~~~~~~~~~~~~~~~~~
Sorry, maybe we should rework the macro of disarm_kprobe_ftrace to an inline function like below.
-#define disarm_kprobe_ftrace(p) (-ENODEV)
+static inline int disarm_kprobe_ftrace(struct kprobe *p) +{
+ return -ENODEV
+}
#endif
Quoted 7 lines
Introduced by commit
0cb2f1372baa("kprobes: Fix NULL pointer dereference atkprobe_ftrace_handler")--
Cheers,
Stephen Rothwell
Signature · 2 lines
Yours, Muchun
Quoted 22 lines · On Wed, 5 Aug 2020 11:11:05 -0400 Steven Rostedt <[email protected]> wrote:
Quoted 19 lines · On Wed, 5 Aug 2020 12:53:39 +0800 Muchun Song <[email protected]> wrote:
Quoted 6 lines · Stephen Rothwell
Hi all,
After merging the ftrace tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:Quoted 8 lines
kernel/kprobes.c: In function 'kill_kprobe':kernel/kprobes.c:1116:33: warning: statement with no effect [-Wunused-value]
1116 | #definedisarm_kprobe_ftrace(p)(-ENODEV)
| ^kernel/kprobes.c:2154:3: note: in expansion of macro 'disarm_kprobe_ftrace'2154 | disarm_kprobe_ftrace(p); | ^~~~~~~~~~~~~~~~~~~~Sorry, maybe we should rework the macro of
disarm_kprobe_ftraceto an inline function like below.
Quoted 9 lines
Review
Quoted 6 lines
(quoted diff) +4
-1-#define disarm_kprobe_ftrace(p) (-ENODEV) +static inline int disarm_kprobe_ftrace(struct kprobe *p) +{ + return -ENODEV +} #endifLooks like that would work. Care to send a formal patch. Could you also change
arm_kprobe_ftrace()as well?
Looks good to me too as far as updating it to static inline function.
Thank you,
Signature · 1 line
Masami Hiramatsu <[email protected]>
Quoted 4 lines · On Thu, 6 Aug 2020 02:04:45 +0900 Masami Hiramatsu <[email protected]> wrote:
Quoted 2 lines
Looks like that would work. Care to send a formal patch. Could you also change
arm_kprobe_ftrace()as well?Looks good to me too as far as updating it to static inline function.
Can you add an Acked-by to the final patch from Muchun? (when he sends it out)
Thanks!
-- Steve
Quoted 23 lines · Steven Rostedt
Quoted 19 lines · On Wed, 5 Aug 2020 12:53:39 +0800 Muchun Song <[email protected]> wrote:
Quoted 6 lines · Stephen Rothwell
Hi all,
After merging the ftrace tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:Quoted 8 lines
kernel/kprobes.c: In function 'kill_kprobe':kernel/kprobes.c:1116:33: warning: statement with no effect [-Wunused-value]
1116 | #definedisarm_kprobe_ftrace(p)(-ENODEV)
| ^kernel/kprobes.c:2154:3: note: in expansion of macro 'disarm_kprobe_ftrace'2154 | disarm_kprobe_ftrace(p); | ^~~~~~~~~~~~~~~~~~~~Sorry, maybe we should rework the macro of
disarm_kprobe_ftraceto an inline function like below.
Quoted 9 lines
Review
Quoted 6 lines
(quoted diff) +4
-1-#define disarm_kprobe_ftrace(p) (-ENODEV) +static inline int disarm_kprobe_ftrace(struct kprobe *p) +{ + return -ENODEV +} #endifLooks like that would work. Care to send a formal patch. Could you also change
arm_kprobe_ftrace()as well?
OK, I will do that. Thanks.
Quoted 4 lines
Thanks!
-- Steve
Signature · 2 lines
Yours, Muchun
Quoted 19 lines · On Wed, 5 Aug 2020 12:53:39 +0800 Muchun Song <[email protected]> wrote:
Quoted 6 lines · Stephen Rothwell
Hi all,
After merging the ftrace tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:Quoted 8 lines
kernel/kprobes.c: In function 'kill_kprobe':kernel/kprobes.c:1116:33: warning: statement with no effect [-Wunused-value]
1116 | #definedisarm_kprobe_ftrace(p)(-ENODEV)
| ^kernel/kprobes.c:2154:3: note: in expansion of macro 'disarm_kprobe_ftrace'2154 | disarm_kprobe_ftrace(p); | ^~~~~~~~~~~~~~~~~~~~Sorry, maybe we should rework the macro of
disarm_kprobe_ftraceto an inline function like below.
Review
Quoted 6 lines
(quoted diff) +4
-1-#define disarm_kprobe_ftrace(p) (-ENODEV) +static inline int disarm_kprobe_ftrace(struct kprobe *p) +{ + return -ENODEV +} #endif
Looks like that would work. Care to send a formal patch. Could you also change arm_kprobe_ftrace() as well?
Thanks!
-- Steve