mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Song Liu <songliubraving@fb.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH] perf: allow non-privileged uprobe for user processes
Date: Tue, 7 May 2019 13:40:06 +0200	[thread overview]
Message-ID: <20190507114006.GS2606@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190507074315.3337668-1-songliubraving@fb.com>

On Tue, May 07, 2019 at 12:43:15AM -0700, Song Liu wrote:
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index abbd4b3b96c2..0508774d82e4 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -8532,9 +8532,10 @@ static int perf_tp_event_match(struct perf_event *event,
>  	if (event->hw.state & PERF_HES_STOPPED)
>  		return 0;
>  	/*
> -	 * All tracepoints are from kernel-space.
> +	 * All tracepoints except uprobes are from kernel-space.
>  	 */
> -	if (event->attr.exclude_kernel)
> +	if (event->attr.exclude_kernel &&
> +	    ((event->tp_event->flags & TRACE_EVENT_FL_UPROBE) == 0))

That doesn't make sense; should you not be checking user_mode(regs)
instead?


  reply	other threads:[~2019-05-07 11:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07  7:43 Song Liu
2019-05-07 11:40 ` Peter Zijlstra [this message]
2019-05-07 16:13   ` Song Liu

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=20190507114006.GS2606@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=songliubraving@fb.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®