Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Mathieu Desnoyers
- On Mar 26, 2018, at 1:55 PM, Alexei Starovoitov a...@fb.com wrote: [...] > > correct. this set deals with in-kernel tracepoints only. > No attempt to do anything with tracepoints inside modules. Please endeavor to handle in-module tracepoints properly, then we'll be able to pursue a more

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Steven Rostedt
On Mon, 26 Mar 2018 11:39:05 -0700 Alexei Starovoitov wrote: > On 3/26/18 11:11 AM, Steven Rostedt wrote: > > On Mon, 26 Mar 2018 10:55:51 -0700 > > Alexei Starovoitov wrote: > > > >> An email ago you were ok to s/return/return NULL/ in your out-of-tree > >> module, but now flip flop to add ne

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Alexei Starovoitov
On 3/26/18 11:11 AM, Steven Rostedt wrote: On Mon, 26 Mar 2018 10:55:51 -0700 Alexei Starovoitov wrote: An email ago you were ok to s/return/return NULL/ in your out-of-tree module, but now flip flop to add new function approach just to reduce the work you need to do in lttng? We're not talkin

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Steven Rostedt
On Mon, 26 Mar 2018 10:55:51 -0700 Alexei Starovoitov wrote: > An email ago you were ok to s/return/return NULL/ in your out-of-tree > module, but now flip flop to add new function approach just to > reduce the work you need to do in lttng? > We're not talking about changing __kmalloc signature h

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Alexei Starovoitov
On 3/26/18 9:57 AM, Mathieu Desnoyers wrote: - On Mar 26, 2018, at 12:35 PM, rostedt rost...@goodmis.org wrote: On Mon, 26 Mar 2018 09:25:07 -0700 Alexei Starovoitov wrote: commit log of patch 6 states: "for_each_tracepoint_range() api has no users inside the kernel. Make it more useful

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Steven Rostedt
On Mon, 26 Mar 2018 09:47:21 -0700 Alexei Starovoitov wrote: > I don't mind to _rename_ for_each_kernel_tracepoint() into > tracepoint_find_by_name(), but keeping exported function > just to be used by out-of-tree modules would be wrong message for > the kernel community in general. > With my pat

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Mathieu Desnoyers
- On Mar 26, 2018, at 12:35 PM, rostedt rost...@goodmis.org wrote: > On Mon, 26 Mar 2018 09:25:07 -0700 > Alexei Starovoitov wrote: > >> commit log of patch 6 states: >> >> "for_each_tracepoint_range() api has no users inside the kernel. >> Make it more useful with ability to stop for_each(

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Alexei Starovoitov
On 3/26/18 9:35 AM, Steven Rostedt wrote: On Mon, 26 Mar 2018 09:25:07 -0700 Alexei Starovoitov wrote: commit log of patch 6 states: "for_each_tracepoint_range() api has no users inside the kernel. Make it more useful with ability to stop for_each() loop depending via callback return value. I

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Steven Rostedt
On Mon, 26 Mar 2018 09:25:07 -0700 Alexei Starovoitov wrote: > commit log of patch 6 states: > > "for_each_tracepoint_range() api has no users inside the kernel. > Make it more useful with ability to stop for_each() loop depending > via callback return value. > In such form it's used in subseque

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Steven Rostedt
On Mon, 26 Mar 2018 11:56:15 -0400 Steven Rostedt wrote: > On Fri, 23 Mar 2018 19:30:34 -0700 > Alexei Starovoitov wrote: > > > +static void *for_each_tracepoint_range(struct tracepoint * const *begin, > > + struct tracepoint * const *end, > > +

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Alexei Starovoitov
On 3/26/18 9:17 AM, Mathieu Desnoyers wrote: re: 'added complexity'... - for (iter = begin; iter < end; iter++) - fct(*iter, priv); + return NULL; + for (iter = begin; iter < end; iter++) { + ret = fct(*iter, priv); + if (ret) +

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Mathieu Desnoyers
- On Mar 26, 2018, at 12:08 PM, Alexei Starovoitov a...@fb.com wrote: > On 3/26/18 8:55 AM, Mathieu Desnoyers wrote: >> - On Mar 26, 2018, at 11:42 AM, Alexei Starovoitov a...@fb.com wrote: >> >>> On 3/26/18 8:14 AM, Mathieu Desnoyers wrote: - On Mar 26, 2018, at 11:02 AM, rostedt

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Alexei Starovoitov
On 3/26/18 8:55 AM, Mathieu Desnoyers wrote: - On Mar 26, 2018, at 11:42 AM, Alexei Starovoitov a...@fb.com wrote: On 3/26/18 8:14 AM, Mathieu Desnoyers wrote: - On Mar 26, 2018, at 11:02 AM, rostedt rost...@goodmis.org wrote: On Fri, 23 Mar 2018 19:30:34 -0700 Alexei Starovoitov wr

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Steven Rostedt
On Fri, 23 Mar 2018 19:30:34 -0700 Alexei Starovoitov wrote: > +static void *for_each_tracepoint_range(struct tracepoint * const *begin, > +struct tracepoint * const *end, > +void *(*fct)(struct tracepoint *tp, void > *priv)

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Mathieu Desnoyers
- On Mar 26, 2018, at 11:42 AM, Alexei Starovoitov a...@fb.com wrote: > On 3/26/18 8:14 AM, Mathieu Desnoyers wrote: >> - On Mar 26, 2018, at 11:02 AM, rostedt rost...@goodmis.org wrote: >> >>> On Fri, 23 Mar 2018 19:30:34 -0700 >>> Alexei Starovoitov wrote: >>> From: Alexei Starovoi

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Alexei Starovoitov
On 3/26/18 8:14 AM, Mathieu Desnoyers wrote: - On Mar 26, 2018, at 11:02 AM, rostedt rost...@goodmis.org wrote: On Fri, 23 Mar 2018 19:30:34 -0700 Alexei Starovoitov wrote: From: Alexei Starovoitov add fancy macro to compute number of arguments passed into tracepoint at compile time an

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Mathieu Desnoyers
- On Mar 26, 2018, at 11:02 AM, rostedt rost...@goodmis.org wrote: > On Fri, 23 Mar 2018 19:30:34 -0700 > Alexei Starovoitov wrote: > >> From: Alexei Starovoitov >> >> add fancy macro to compute number of arguments passed into tracepoint >> at compile time and store it as part of 'struct t

Re: [PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-26 Thread Steven Rostedt
On Fri, 23 Mar 2018 19:30:34 -0700 Alexei Starovoitov wrote: > From: Alexei Starovoitov > > add fancy macro to compute number of arguments passed into tracepoint > at compile time and store it as part of 'struct tracepoint'. > The number is necessary to check safety of bpf program access that >

[PATCH v5 bpf-next 06/10] tracepoint: compute num_args at build time

2018-03-23 Thread Alexei Starovoitov
From: Alexei Starovoitov add fancy macro to compute number of arguments passed into tracepoint at compile time and store it as part of 'struct tracepoint'. The number is necessary to check safety of bpf program access that is coming in subsequent patch. for_each_tracepoint_range() api has no use