[PATCH bpf-next v4 2/6] bpf: Add a ARG_PTR_TO_CONST_STR argument type

2021-04-14 Thread Florent Revest
This type provides the guarantee that an argument is going to be a const pointer to somewhere in a read-only map value. It also checks that this pointer is followed by a zero character before the end of the map value. Signed-off-by: Florent Revest Acked-by: Andrii Nakryiko --- include/linux

[PATCH bpf-next v4 4/6] libbpf: Initialize the bpf_seq_printf parameters array field by field

2021-04-14 Thread Florent Revest
: Add bpf_iter support") Signed-off-by: Florent Revest Acked-by: Andrii Nakryiko --- tools/lib/bpf/bpf_tracing.h | 40 +++-- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/tools/lib/bpf/bpf_tracing.h b/tools/lib/bpf/bpf_tracing.h index f9

[PATCH bpf-next v4 6/6] selftests/bpf: Add a series of tests for bpf_snprintf

2021-04-14 Thread Florent Revest
The "positive" part tests all format specifiers when things go well. The "negative" part makes sure that incorrect format strings fail at load time. Signed-off-by: Florent Revest --- .../selftests/bpf/prog_tests/snprintf.c | 124 ++ .../selftests/bpf/p

[PATCH bpf-next v4 1/6] bpf: Factorize bpf_trace_printk and bpf_seq_printf

2021-04-14 Thread Florent Revest
symbols. The implementation is also moved from bpf_trace.c to helpers.c because the upcoming bpf_snprintf helper will be made available to all BPF programs and will need it. Signed-off-by: Florent Revest --- include/linux/bpf.h | 20 +++ kernel/bpf/helpers.c | 254

[PATCH bpf-next v4 5/6] libbpf: Introduce a BPF_SNPRINTF helper macro

2021-04-14 Thread Florent Revest
Similarly to BPF_SEQ_PRINTF, this macro turns variadic arguments into an array of u64, making it more natural to call the bpf_snprintf helper. Signed-off-by: Florent Revest Acked-by: Andrii Nakryiko --- tools/lib/bpf/bpf_tracing.h | 18 ++ 1 file changed, 18 insertions(+) diff

Re: [PATCH bpf-next v3 3/6] bpf: Add a bpf_snprintf helper

2021-04-14 Thread Florent Revest
Hey Geert! :) On Wed, Apr 14, 2021 at 8:02 PM Geert Uytterhoeven wrote: > On Wed, Apr 14, 2021 at 9:41 AM Andrii Nakryiko > wrote: > > On Mon, Apr 12, 2021 at 8:38 AM Florent Revest wrote: > > > + fmt = (char *)fmt_addr + fmt_map_off; > > > + > > &g

[PATCH bpf-next v4 0/6] Add a snprintf eBPF helper

2021-04-14 Thread Florent Revest
now preempt_disable when using a per-cpu temporary buffer - Addressed a few cosmetic changes Florent Revest (6): bpf: Factorize bpf_trace_printk and bpf_seq_printf bpf: Add a ARG_PTR_TO_CONST_STR argument type bpf: Add a bpf_snprintf helper libbpf: Initialize the bpf_seq_printf parameters

Re: [PATCH bpf-next v5 2/6] bpf: Add a ARG_PTR_TO_CONST_STR argument type

2021-04-20 Thread Florent Revest
On Tue, Apr 20, 2021 at 12:54 AM Alexei Starovoitov wrote: > > On Mon, Apr 19, 2021 at 05:52:39PM +0200, Florent Revest wrote: > > This type provides the guarantee that an argument is going to be a const > > pointer to somewhere in a read-only map value. It also checks tha

Re: [PATCH bpf-next v5 0/6] Add a snprintf eBPF helper

2021-04-20 Thread Florent Revest
On Mon, Apr 19, 2021 at 9:34 PM Andrii Nakryiko wrote: > > On Mon, Apr 19, 2021 at 8:52 AM Florent Revest wrote: > > > > We have a usecase where we want to audit symbol names (if available) in > > callback registration hooks. (ex: fentry/nf_register_net_hook) >

Re: [PATCH bpf-next v4 6/6] selftests/bpf: Add a series of tests for bpf_snprintf

2021-04-16 Thread Florent Revest
On Fri, Apr 16, 2021 at 1:20 AM Andrii Nakryiko wrote: > > On Wed, Apr 14, 2021 at 11:54 AM Florent Revest wrote: > > +/* Loads an eBPF object calling bpf_snprintf with up to 10 characters of > > fmt */ > > +static int load_single_snprintf(char *fmt) &

Re: [PATCH v9 01/36] tracing: Add a comment about ftrace_regs definition

2024-04-24 Thread Florent Revest
On Wed, Apr 24, 2024 at 2:23 PM Florent Revest wrote: > > On Mon, Apr 15, 2024 at 2:49 PM Masami Hiramatsu (Google) > wrote: > > > > From: Masami Hiramatsu (Google) > > > > To clarify what will be expected on ftrace_regs, add a comment to the > &

Re: [PATCH v9 01/36] tracing: Add a comment about ftrace_regs definition

2024-04-24 Thread Florent Revest
On Mon, Apr 15, 2024 at 2:49 PM Masami Hiramatsu (Google) wrote: > > From: Masami Hiramatsu (Google) > > To clarify what will be expected on ftrace_regs, add a comment to the > architecture independent definition of the ftrace_regs. > > Signed-off-by: Masami Hiramatsu (Google) > Acked-by: Mark

Re: [PATCH v9 00/36] tracing: fprobe: function_graph: Multi-function graph and fprobe on fgraph

2024-04-24 Thread Florent Revest
Neat! :) I had a look at mostly the "high level" part (fprobe and arm64 specific bits) and this seems to be in a good state to me. Thanks for all that work, that is quite a refactoring :) On Mon, Apr 15, 2024 at 2:49 PM Masami Hiramatsu (Google) wrote: > > Hi, > > Here is the 9th version of the

<    1   2   3