All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
	jolsa@redhat.com, linux-kernel@vger.kernel.org,
	"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	acme@kernel.org
Subject: Re: [PATCH] tools/perf: doc: Add permission and sysctl notice
Date: Wed, 26 May 2021 22:16:47 +0900	[thread overview]
Message-ID: <20210526221647.972ffffddc88c1b08c19a024@kernel.org> (raw)
In-Reply-To: <ebaefebf-76d0-790a-2062-6f451b683be8@linux.ibm.com>

On Wed, 26 May 2021 15:20:58 +0530
Ravi Bangoria <ravi.bangoria@linux.ibm.com> wrote:

> 
> 
> On 5/26/21 2:31 PM, Masami Hiramatsu wrote:
> > Add a section to notify the permission and sysctl setting
> > for perf probe. And fix some indentations.
> 
> Yes, it makes sense to have this detail in man page.
> 
> Few minor points below ...
> 
> >   
> > +PERMISSIONS AND SYSCTL
> > +----------------------
> > +Since perf probe depends on ftrace (tracefs) and kallsyms (/proc/kallsyms), you have to care about the permission and some sysctl knobs.
> > +
> > + - Since tracefs and kallsyms requires root or privileged user to access it, the following perf probe commands also require it; --add, --del, --list (except for --cache option)
> > +
> > + - /proc/sys/kernel/kptr_restrict = 2 (restrict all users) also prevents perf probe to retrieve the important information from kallsyms. You also need to set to 1 (restrict non CAP_SYSLOG users) for the above commands.
> > +
> > + - Since the perf probe commands read the vmlinux and/or the debuginfo file, you need to ensure that you can read those files.
> 
> 1) Last two points are applicable to kprobes only, not uprobes. Would
>     it make sense to clarify that?

Ah, right. And the last one may be also related to uprobes.

> 2) For 3rd point, simple perf probe on function entry will work without
>     vmlinux/debuginfo (by using kallsyms). Should we mention that?

Hmm, that depends on the options. If we use -k option, it will get the symbols from the given vmlinux.

> 
> In any case,
> 
> Acked-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>

Thanks! I'll update it for uprobe.


> 
> Ravi


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2021-05-26 13:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25  4:37 [PATCH] perf probe: Provide more detail with relocation warning Ravi Bangoria
2021-05-25 12:48 ` Masami Hiramatsu
2021-05-26  4:53   ` Ravi Bangoria
2021-05-26  6:33     ` Masami Hiramatsu
2021-05-26 12:56       ` Arnaldo Carvalho de Melo
2021-05-26 14:20         ` Masami Hiramatsu
2021-06-02 11:52           ` Arnaldo Carvalho de Melo
2021-06-02 12:12             ` Masami Hiramatsu
2021-06-02 13:15               ` Arnaldo Carvalho de Melo
2021-05-26  9:01 ` [PATCH] tools/perf: doc: Add permission and sysctl notice Masami Hiramatsu
2021-05-26  9:50   ` Ravi Bangoria
2021-05-26 13:16     ` Masami Hiramatsu [this message]
2021-05-26 14:51   ` [PATCH v2] " Masami Hiramatsu
2021-06-02 11:53     ` Arnaldo Carvalho de Melo
2021-06-02 13:51       ` Ravi Bangoria
2021-06-04 13:25         ` 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=20210526221647.972ffffddc88c1b08c19a024@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ravi.bangoria@linux.ibm.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 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.