linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ebpf, events: make it actually more configurable
@ 2015-10-02 15:43 Daniel Borkmann
  2015-10-03  6:37 ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Borkmann @ 2015-10-02 15:43 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, Daniel Borkmann, Alexei Starovoitov, Steven Rostedt

While testing some other BPF issue, I realized that BPF_EVENTS is
actually not accessible through menuconfig because of a missing
description that needs to be attached to the bool. After the patch
the entry shows up in menuconfig and can be enabled/disabled from
there.

Fixes: e1abf2cc8d5d ("bpf: Fix the build on BPF_SYSCALL=y && !CONFIG_TRACING kernels, make it more configurable")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 1153c43..db9a8c4 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -433,9 +433,9 @@ config UPROBE_EVENT
 	  of perf tools on user space applications.
 
 config BPF_EVENTS
+	bool "Enable BPF programs to be attached to events"
 	depends on BPF_SYSCALL
 	depends on KPROBE_EVENT || UPROBE_EVENT
-	bool
 	default y
 	help
 	  This allows the user to attach BPF programs to kprobe events.
-- 
1.9.3


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

* Re: [PATCH] ebpf, events: make it actually more configurable
  2015-10-02 15:43 [PATCH] ebpf, events: make it actually more configurable Daniel Borkmann
@ 2015-10-03  6:37 ` Ingo Molnar
  2015-10-03  7:42   ` Daniel Borkmann
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2015-10-03  6:37 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: linux-kernel, Alexei Starovoitov, Steven Rostedt


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

> While testing some other BPF issue, I realized that BPF_EVENTS is
> actually not accessible through menuconfig because of a missing
> description that needs to be attached to the bool. After the patch
> the entry shows up in menuconfig and can be enabled/disabled from
> there.

Yeah, so the principle is the following: the main configuration option for it is 
BPF_SYSCALL. The BPF_EVENTS is an internal detail, always enabled when possible, 
and we make it so that if the BPF syscall is enabled, we'll enable the perf 
integration if all the must-have components are in place:

>  	depends on KPROBE_EVENT || UPROBE_EVENT
>  	default y

So this is intentional.

Unless your suggestion is to also enable it when neither KPROBE_EVENT nor 
UPROBE_EVENT are defined. Does that make sense?

Thanks,

	Ingo

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

* Re: [PATCH] ebpf, events: make it actually more configurable
  2015-10-03  6:37 ` Ingo Molnar
@ 2015-10-03  7:42   ` Daniel Borkmann
  2015-10-03  8:24     ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Borkmann @ 2015-10-03  7:42 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Alexei Starovoitov, Steven Rostedt

On 10/03/2015 08:37 AM, Ingo Molnar wrote:
>
> * Daniel Borkmann <daniel@iogearbox.net> wrote:
>
>> While testing some other BPF issue, I realized that BPF_EVENTS is
>> actually not accessible through menuconfig because of a missing
>> description that needs to be attached to the bool. After the patch
>> the entry shows up in menuconfig and can be enabled/disabled from
>> there.
>
> Yeah, so the principle is the following: the main configuration option for it is
> BPF_SYSCALL. The BPF_EVENTS is an internal detail, always enabled when possible,
> and we make it so that if the BPF syscall is enabled, we'll enable the perf
> integration if all the must-have components are in place:

Makes sense, yes. I probably got confused due to the help text on the
hidden Kconfig entry, but that can nevertheless serve as documentation
purpose.

Thanks,
Daniel

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

* Re: [PATCH] ebpf, events: make it actually more configurable
  2015-10-03  7:42   ` Daniel Borkmann
@ 2015-10-03  8:24     ` Ingo Molnar
  2015-10-04 22:16       ` Daniel Borkmann
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2015-10-03  8:24 UTC (permalink / raw)
  To: Daniel Borkmann; +Cc: linux-kernel, Alexei Starovoitov, Steven Rostedt


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

> On 10/03/2015 08:37 AM, Ingo Molnar wrote:
> >
> >* Daniel Borkmann <daniel@iogearbox.net> wrote:
> >
> >>While testing some other BPF issue, I realized that BPF_EVENTS is
> >>actually not accessible through menuconfig because of a missing
> >>description that needs to be attached to the bool. After the patch
> >>the entry shows up in menuconfig and can be enabled/disabled from
> >>there.
> >
> > Yeah, so the principle is the following: the main configuration option for it 
> > is BPF_SYSCALL. The BPF_EVENTS is an internal detail, always enabled when 
> > possible, and we make it so that if the BPF syscall is enabled, we'll enable 
> > the perf integration if all the must-have components are in place:
> 
> Makes sense, yes. I probably got confused due to the help text on the hidden 
> Kconfig entry, but that can nevertheless serve as documentation purpose.

Feel free to send a patch that adds a sentence to that help text that explains 
that this is an internal helper Kconfig entry that does not need to be 
interactively configurable.

Thanks,

	Ingo

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

* Re: [PATCH] ebpf, events: make it actually more configurable
  2015-10-03  8:24     ` Ingo Molnar
@ 2015-10-04 22:16       ` Daniel Borkmann
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Borkmann @ 2015-10-04 22:16 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Alexei Starovoitov, Steven Rostedt

On 10/03/2015 10:24 AM, Ingo Molnar wrote:
...
> Feel free to send a patch that adds a sentence to that help text that explains
> that this is an internal helper Kconfig entry that does not need to be
> interactively configurable.

Sorry for the late reply. I think it's actually fine as-is, noticed that the
same is being done various times in this Kconfig.

Thanks again,
Daniel

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

end of thread, other threads:[~2015-10-04 22:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-02 15:43 [PATCH] ebpf, events: make it actually more configurable Daniel Borkmann
2015-10-03  6:37 ` Ingo Molnar
2015-10-03  7:42   ` Daniel Borkmann
2015-10-03  8:24     ` Ingo Molnar
2015-10-04 22:16       ` Daniel Borkmann

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