All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler
@ 2016-09-06 13:10 Arnd Bergmann
  2016-09-06 15:33 ` Alexei Starovoitov
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2016-09-06 13:10 UTC (permalink / raw)
  To: David S . Miller, netdev
  Cc: Alexei Starovoitov, Arnd Bergmann, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Alexei Starovoitov,
	linux-kernel

The newly added bpf_overflow_handler function is only built of both
CONFIG_EVENT_TRACING and CONFIG_BPF_SYSCALL are enabled, but the caller
only checks the latter:

kernel/events/core.c: In function 'perf_event_alloc':
kernel/events/core.c:9106:27: error: 'bpf_overflow_handler' undeclared (first use in this function)

This changes the caller so we also skip this call if CONFIG_EVENT_TRACING
is disabled entirely.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: aa6a5f3cb2b2 ("perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs")
---
 kernel/events/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I'm not entirely sure if this is the correct solution, please check before applying

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 73d0c6ddfd5b..d3f6374326d8 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9110,7 +9110,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu,
 	if (!overflow_handler && parent_event) {
 		overflow_handler = parent_event->overflow_handler;
 		context = parent_event->overflow_handler_context;
-#ifdef CONFIG_BPF_SYSCALL
+#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_EVENT_TRACING)
 		if (overflow_handler == bpf_overflow_handler) {
 			struct bpf_prog *prog = bpf_prog_inc(parent_event->prog);
 
-- 
2.9.0

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

* Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler
  2016-09-06 13:10 [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler Arnd Bergmann
@ 2016-09-06 15:33 ` Alexei Starovoitov
  2016-09-08  6:30   ` Ingo Molnar
  0 siblings, 1 reply; 7+ messages in thread
From: Alexei Starovoitov @ 2016-09-06 15:33 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David S . Miller, netdev, Alexei Starovoitov, Peter Zijlstra,
	Ingo Molnar, Arnaldo Carvalho de Melo, Alexander Shishkin,
	Alexei Starovoitov, linux-kernel

On Tue, Sep 06, 2016 at 03:10:22PM +0200, Arnd Bergmann wrote:
> The newly added bpf_overflow_handler function is only built of both
> CONFIG_EVENT_TRACING and CONFIG_BPF_SYSCALL are enabled, but the caller
> only checks the latter:
> 
> kernel/events/core.c: In function 'perf_event_alloc':
> kernel/events/core.c:9106:27: error: 'bpf_overflow_handler' undeclared (first use in this function)
> 
> This changes the caller so we also skip this call if CONFIG_EVENT_TRACING
> is disabled entirely.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: aa6a5f3cb2b2 ("perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs")
> ---
>  kernel/events/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> I'm not entirely sure if this is the correct solution, please check before applying

Acked-by: Alexei Starovoitov <ast@kernel.org>

Thanks for the fix. Just saw build bot complaining last night and
by the morning your fix is already here. Thanks!

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

* Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler
  2016-09-06 15:33 ` Alexei Starovoitov
@ 2016-09-08  6:30   ` Ingo Molnar
  2016-09-08  6:56     ` Peter Zijlstra
  0 siblings, 1 reply; 7+ messages in thread
From: Ingo Molnar @ 2016-09-08  6:30 UTC (permalink / raw)
  To: Alexei Starovoitov, David S. Miller, Peter Zijlstra
  Cc: Arnd Bergmann, David S . Miller, netdev, Alexei Starovoitov,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Alexei Starovoitov, linux-kernel


* Alexei Starovoitov <alexei.starovoitov@gmail.com> wrote:

> On Tue, Sep 06, 2016 at 03:10:22PM +0200, Arnd Bergmann wrote:
> > The newly added bpf_overflow_handler function is only built of both
> > CONFIG_EVENT_TRACING and CONFIG_BPF_SYSCALL are enabled, but the caller
> > only checks the latter:
> > 
> > kernel/events/core.c: In function 'perf_event_alloc':
> > kernel/events/core.c:9106:27: error: 'bpf_overflow_handler' undeclared (first use in this function)
> > 
> > This changes the caller so we also skip this call if CONFIG_EVENT_TRACING
> > is disabled entirely.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Fixes: aa6a5f3cb2b2 ("perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs")
> > ---
> >  kernel/events/core.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > I'm not entirely sure if this is the correct solution, please check before applying
> 
> Acked-by: Alexei Starovoitov <ast@kernel.org>
> 
> Thanks for the fix. Just saw build bot complaining last night and
> by the morning your fix is already here. Thanks!

Guys, this is the first time I saw this patch (and presumably there's some other 
patch as well?) - could you please submit it properly for review and get an 
Acked-by from one of the perf maintainers before appying it?

Thanks,

	Ingo

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

* Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler
  2016-09-08  6:30   ` Ingo Molnar
@ 2016-09-08  6:56     ` Peter Zijlstra
  2016-09-08  7:01       ` Ingo Molnar
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Zijlstra @ 2016-09-08  6:56 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Alexei Starovoitov, David S. Miller, Arnd Bergmann, netdev,
	Alexei Starovoitov, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Alexei Starovoitov, linux-kernel

On Thu, Sep 08, 2016 at 08:30:52AM +0200, Ingo Molnar wrote:
> > Thanks for the fix. Just saw build bot complaining last night and
> > by the morning your fix is already here. Thanks!
> 
> Guys, this is the first time I saw this patch (and presumably there's some other 
> patch as well?) - could you please submit it properly for review and get an 
> Acked-by from one of the perf maintainers before appying it?

I was involved with the original patch and Ack'ed it.

Ack on this one as well.

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

* Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler
  2016-09-08  6:56     ` Peter Zijlstra
@ 2016-09-08  7:01       ` Ingo Molnar
  2016-09-08  8:03         ` Daniel Borkmann
  0 siblings, 1 reply; 7+ messages in thread
From: Ingo Molnar @ 2016-09-08  7:01 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Alexei Starovoitov, David S. Miller, Arnd Bergmann, netdev,
	Alexei Starovoitov, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Alexei Starovoitov, linux-kernel


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Thu, Sep 08, 2016 at 08:30:52AM +0200, Ingo Molnar wrote:
> > > Thanks for the fix. Just saw build bot complaining last night and
> > > by the morning your fix is already here. Thanks!
> > 
> > Guys, this is the first time I saw this patch (and presumably there's some other 
> > patch as well?) - could you please submit it properly for review and get an 
> > Acked-by from one of the perf maintainers before appying it?
> 
> I was involved with the original patch and Ack'ed it.

Neither the Ack nor the Cc:s were preserved in the net-next commit:

  aa6a5f3cb2b2 ("perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs")

> Ack on this one as well.

Great, thanks!

	Ingo

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

* Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler
  2016-09-08  7:01       ` Ingo Molnar
@ 2016-09-08  8:03         ` Daniel Borkmann
  2016-09-08  9:40           ` Ingo Molnar
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Borkmann @ 2016-09-08  8:03 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra
  Cc: Alexei Starovoitov, David S. Miller, Arnd Bergmann, netdev,
	Alexei Starovoitov, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Alexei Starovoitov, linux-kernel

On 09/08/2016 09:01 AM, Ingo Molnar wrote:
> * Peter Zijlstra <peterz@infradead.org> wrote:
>> On Thu, Sep 08, 2016 at 08:30:52AM +0200, Ingo Molnar wrote:
>>>> Thanks for the fix. Just saw build bot complaining last night and
>>>> by the morning your fix is already here. Thanks!
>>>
>>> Guys, this is the first time I saw this patch (and presumably there's some other
>>> patch as well?) - could you please submit it properly for review and get an
>>> Acked-by from one of the perf maintainers before appying it?
>>
>> I was involved with the original patch and Ack'ed it.
>
> Neither the Ack nor the Cc:s were preserved in the net-next commit:
>
>    aa6a5f3cb2b2 ("perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs")

Afaik patchwork doesn't pick up Acks when they are against the
cover letter of a series. For the series that includes mentioned
commit, Peter's Ack is here:

     4df20483ab28 ("Merge branch 'bpf-perf-hw-sw-events'")

>> Ack on this one as well.
>
> Great, thanks!
>
> 	Ingo
>

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

* Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler
  2016-09-08  8:03         ` Daniel Borkmann
@ 2016-09-08  9:40           ` Ingo Molnar
  0 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2016-09-08  9:40 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: Peter Zijlstra, Alexei Starovoitov, David S. Miller,
	Arnd Bergmann, netdev, Alexei Starovoitov, Ingo Molnar,
	Arnaldo Carvalho de Melo, Alexander Shishkin, Alexei Starovoitov,
	linux-kernel


* Daniel Borkmann <daniel@iogearbox.net> wrote:

> On 09/08/2016 09:01 AM, Ingo Molnar wrote:
> >* Peter Zijlstra <peterz@infradead.org> wrote:
> >>On Thu, Sep 08, 2016 at 08:30:52AM +0200, Ingo Molnar wrote:
> >>>>Thanks for the fix. Just saw build bot complaining last night and
> >>>>by the morning your fix is already here. Thanks!
> >>>
> >>>Guys, this is the first time I saw this patch (and presumably there's some other
> >>>patch as well?) - could you please submit it properly for review and get an
> >>>Acked-by from one of the perf maintainers before appying it?
> >>
> >>I was involved with the original patch and Ack'ed it.
> >
> >Neither the Ack nor the Cc:s were preserved in the net-next commit:
> >
> >   aa6a5f3cb2b2 ("perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs")
> 
> Afaik patchwork doesn't pick up Acks when they are against the
> cover letter of a series. [...]

That's unfortunate - I usually add them in manually.

> [...] For the series that includes mentioned commit, Peter's Ack is here:
> 
>     4df20483ab28 ("Merge branch 'bpf-perf-hw-sw-events'")

Looks good!

Thanks,

	Ingo

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

end of thread, other threads:[~2016-09-08  9:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 13:10 [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler Arnd Bergmann
2016-09-06 15:33 ` Alexei Starovoitov
2016-09-08  6:30   ` Ingo Molnar
2016-09-08  6:56     ` Peter Zijlstra
2016-09-08  7:01       ` Ingo Molnar
2016-09-08  8:03         ` Daniel Borkmann
2016-09-08  9:40           ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.