linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the ftrace tree
@ 2020-08-05  4:21 Stephen Rothwell
  2020-08-05  4:53 ` [External] " Muchun Song
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2020-08-05  4:21 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Muchun Song,
	Chengming Zhou, Masami Hiramatsu

[-- Attachment #1: Type: text/plain, Size: 626 bytes --]

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")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [External] linux-next: build warning after merge of the ftrace tree
  2020-08-05  4:21 linux-next: build warning after merge of the ftrace tree Stephen Rothwell
@ 2020-08-05  4:53 ` Muchun Song
  2020-08-05 15:11   ` Steven Rostedt
  0 siblings, 1 reply; 6+ messages in thread
From: Muchun Song @ 2020-08-05  4:53 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Steven Rostedt, Linux Next Mailing List,
	Linux Kernel Mailing List, Chengming Zhou, Masami Hiramatsu

On Wed, Aug 5, 2020 at 12:21 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> 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);
>       |   ^~~~~~~~~~~~~~~~~~~~
>

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

> Introduced by commit
>
>   0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler")
>
> --
> Cheers,
> Stephen Rothwell



-- 
Yours,
Muchun

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [External] linux-next: build warning after merge of the ftrace tree
  2020-08-05  4:53 ` [External] " Muchun Song
@ 2020-08-05 15:11   ` Steven Rostedt
  2020-08-05 15:51     ` Muchun Song
  2020-08-05 17:04     ` Masami Hiramatsu
  0 siblings, 2 replies; 6+ messages in thread
From: Steven Rostedt @ 2020-08-05 15:11 UTC (permalink / raw)
  To: Muchun Song
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Chengming Zhou, Masami Hiramatsu

On Wed, 5 Aug 2020 12:53:39 +0800
Muchun Song <songmuchun@bytedance.com> wrote:

> On Wed, Aug 5, 2020 at 12:21 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > 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);
> >       |   ^~~~~~~~~~~~~~~~~~~~
> >  
> 
> 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

Looks like that would work. Care to send a formal patch. Could you also
change arm_kprobe_ftrace() as well?

Thanks!

-- Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [External] linux-next: build warning after merge of the ftrace tree
  2020-08-05 15:11   ` Steven Rostedt
@ 2020-08-05 15:51     ` Muchun Song
  2020-08-05 17:04     ` Masami Hiramatsu
  1 sibling, 0 replies; 6+ messages in thread
From: Muchun Song @ 2020-08-05 15:51 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Chengming Zhou, Masami Hiramatsu

On Wed, Aug 5, 2020 at 11:11 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Wed, 5 Aug 2020 12:53:39 +0800
> Muchun Song <songmuchun@bytedance.com> wrote:
>
> > On Wed, Aug 5, 2020 at 12:21 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > 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);
> > >       |   ^~~~~~~~~~~~~~~~~~~~
> > >
> >
> > 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
>
> Looks 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.

>
> Thanks!
>
> -- Steve



-- 
Yours,
Muchun

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [External] linux-next: build warning after merge of the ftrace tree
  2020-08-05 15:11   ` Steven Rostedt
  2020-08-05 15:51     ` Muchun Song
@ 2020-08-05 17:04     ` Masami Hiramatsu
  2020-08-05 17:09       ` Steven Rostedt
  1 sibling, 1 reply; 6+ messages in thread
From: Masami Hiramatsu @ 2020-08-05 17:04 UTC (permalink / raw)
  To: Steven Rostedt
  Cc: Muchun Song, Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Chengming Zhou, Masami Hiramatsu

On Wed, 5 Aug 2020 11:11:05 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed, 5 Aug 2020 12:53:39 +0800
> Muchun Song <songmuchun@bytedance.com> wrote:
> 
> > On Wed, Aug 5, 2020 at 12:21 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > >
> > > 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);
> > >       |   ^~~~~~~~~~~~~~~~~~~~
> > >  
> > 
> > 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
> 
> 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.

Thank you,

-- 
Masami Hiramatsu <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [External] linux-next: build warning after merge of the ftrace tree
  2020-08-05 17:04     ` Masami Hiramatsu
@ 2020-08-05 17:09       ` Steven Rostedt
  0 siblings, 0 replies; 6+ messages in thread
From: Steven Rostedt @ 2020-08-05 17:09 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: Muchun Song, Stephen Rothwell, Linux Next Mailing List,
	Linux Kernel Mailing List, Chengming Zhou

On Thu, 6 Aug 2020 02:04:45 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:

> > 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-05 20:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05  4:21 linux-next: build warning after merge of the ftrace tree Stephen Rothwell
2020-08-05  4:53 ` [External] " Muchun Song
2020-08-05 15:11   ` Steven Rostedt
2020-08-05 15:51     ` Muchun Song
2020-08-05 17:04     ` Masami Hiramatsu
2020-08-05 17:09       ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).