[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7326024-de29-929d-e6f9-c24c230d45e8@mojatatu.com>
Date: Sat, 12 Jan 2019 08:59:41 -0500
From: Jamal Hadi Salim <jhs@...atatu.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Alexei Starovoitov <alexei.starovoitov@...il.com>,
Daniel Borkmann <daniel@...earbox.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Networking Development Mailing List
<netdev@...r.kernel.org>
Subject: Re: [PATCH/RFC] Make perf_event_open() propagate errors for use in
bpf_perf_event_open()
On 2019-01-11 10:55 a.m., Arnaldo Carvalho de Melo wrote:
> Hi Peter,
>
> bpf_perf_event_open() already returns a value, but if
> perf_event_output's output_begin (mostly perf_output_begin) fails,
> the only way to know about that is looking before/after the rb->lost,
> right?
>
> For ring buffer users that is ok, we'll get a PERF_RECORD_LOST,
> etc, but for BPF programs it would be convenient to get that -ENOSPC and
> do some fallback, whatever makes sense, like in my augmented_syscalls
> stuff for 'perf trace', i.e. don't augment it (i.e. push stuff at the
> end of the normal payload), just don't filter the
> raw_syscalls:sys_enter, 'perf trace' will get the enter syscall enter
> event without the pointer dereference at the end, etc, warn the user but
> don't lose a syscall in the strace-like output.
>
> What do you think? Am I missing something? Probably ;-)
>
> Ah, its just test built.
Works as advertised ;->
Tested-by: Jamal Hadi Salim <jhs@...atatu.com>
cheers,
jamal
Powered by blists - more mailing lists