Re: [PATCH v2 bpf-next 5/8] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-26 Thread Daniel Borkmann
On 03/24/2018 02:43 AM, Alexei Starovoitov wrote: > On 3/23/18 5:58 PM, Alexei Starovoitov wrote: >> On 3/23/18 4:13 PM, Daniel Borkmann wrote: >>> On 03/22/2018 04:41 PM, Alexei Starovoitov wrote: On 3/22/18 2:43 AM, Daniel Borkmann wrote: > On 03/21/2018 07:54 PM, Alexei Starovoitov wrot

Re: [PATCH v2 bpf-next 5/8] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-23 Thread Linus Torvalds
On Fri, Mar 23, 2018 at 6:43 PM, Alexei Starovoitov wrote: > > it's not the limit I'm hitting, but self referential issue. > Exactly half gets expanded. > I don't think there is an easy workaround other > than duplicating the whole chain of REPEAT macro twice > with slightly different name. Take

Re: [PATCH v2 bpf-next 5/8] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-23 Thread Alexei Starovoitov
On 3/23/18 5:58 PM, Alexei Starovoitov wrote: On 3/23/18 4:13 PM, Daniel Borkmann wrote: On 03/22/2018 04:41 PM, Alexei Starovoitov wrote: On 3/22/18 2:43 AM, Daniel Borkmann wrote: On 03/21/2018 07:54 PM, Alexei Starovoitov wrote: [...] @@ -546,6 +556,53 @@ extern void ftrace_profile_free_fi

Re: [PATCH v2 bpf-next 5/8] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-23 Thread Steven Rostedt
On Sat, 24 Mar 2018 00:13:28 +0100 Daniel Borkmann wrote: > #define UNPACK(...) __VA_ARGS__ > #define REPEAT_1(FN, DL, X, ...) FN(X) > #define REPEAT_2(FN, DL, X, ...) FN(X) UNPACK DL REPEAT_1(FN, DL, > __VA_ARGS__) > #define REPEAT_3(FN, DL, X, ...) FN(X) UNPACK

Re: [PATCH v2 bpf-next 5/8] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-23 Thread Alexei Starovoitov
On 3/23/18 4:13 PM, Daniel Borkmann wrote: On 03/22/2018 04:41 PM, Alexei Starovoitov wrote: On 3/22/18 2:43 AM, Daniel Borkmann wrote: On 03/21/2018 07:54 PM, Alexei Starovoitov wrote: [...] @@ -546,6 +556,53 @@ extern void ftrace_profile_free_filter(struct perf_event *event); void perf_tra

Re: [PATCH v2 bpf-next 5/8] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-23 Thread Daniel Borkmann
On 03/22/2018 04:41 PM, Alexei Starovoitov wrote: > On 3/22/18 2:43 AM, Daniel Borkmann wrote: >> On 03/21/2018 07:54 PM, Alexei Starovoitov wrote: >> [...] >>> @@ -546,6 +556,53 @@ extern void ftrace_profile_free_filter(struct >>> perf_event *event); >>>  void perf_trace_buf_update(void *record,

Re: [PATCH v2 bpf-next 5/8] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-22 Thread Alexei Starovoitov
On 3/22/18 2:43 AM, Daniel Borkmann wrote: On 03/21/2018 07:54 PM, Alexei Starovoitov wrote: [...] @@ -546,6 +556,53 @@ extern void ftrace_profile_free_filter(struct perf_event *event); void perf_trace_buf_update(void *record, u16 type); void *perf_trace_buf_alloc(int size, struct pt_regs **r

Re: [PATCH v2 bpf-next 5/8] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-22 Thread Daniel Borkmann
On 03/21/2018 07:54 PM, Alexei Starovoitov wrote: [...] > @@ -546,6 +556,53 @@ extern void ftrace_profile_free_filter(struct perf_event > *event); > void perf_trace_buf_update(void *record, u16 type); > void *perf_trace_buf_alloc(int size, struct pt_regs **regs, int *rctxp); > > +void bpf_trac

[PATCH v2 bpf-next 5/8] bpf: introduce BPF_RAW_TRACEPOINT

2018-03-21 Thread Alexei Starovoitov
From: Alexei Starovoitov Introduce BPF_PROG_TYPE_RAW_TRACEPOINT bpf program type to access kernel internal arguments of the tracepoints in their raw form. >From bpf program point of view the access to the arguments look like: struct bpf_raw_tracepoint_args { __u64 args[0]; }; int bpf_pro