All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Networking Development Mailing List 
	<netdev@vger.kernel.org>
Subject: Re: [PATCH/RFC] Make perf_event_open() propagate errors for use in bpf_perf_event_open()
Date: Fri, 18 Jan 2019 15:52:37 +0100	[thread overview]
Message-ID: <20190118145237.GD27931@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190111155538.GX22483@kernel.org>

On Fri, Jan 11, 2019 at 12:55:38PM -0300, 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 ;-)

Seems ok to do this.

  parent reply	other threads:[~2019-01-18 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11 15:55 Arnaldo Carvalho de Melo
2019-01-11 15:55 ` Arnaldo Carvalho de Melo
2019-01-12 13:59 ` Jamal Hadi Salim
2019-01-12 13:59   ` Jamal Hadi Salim
2019-01-18 14:52 ` Peter Zijlstra [this message]
2019-01-18 15:09   ` Arnaldo Carvalho de Melo
2019-01-18 16:19     ` Peter Zijlstra
2019-01-22 10:17     ` [tip:perf/core] perf: Make perf_event_output() propagate the output() return tip-bot for Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190118145237.GD27931@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=jhs@mojatatu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH/RFC] Make perf_event_open() propagate errors for use in bpf_perf_event_open()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.