linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Andi Kleen <ak@linux.intel.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"selinux@vger.kernel.org" <selinux@vger.kernel.org>,
	"linux-security-module@vger.kernel.org" 
	<linux-security-module@vger.kernel.org>
Subject: Re: [PATCH v2 1/4] perf trace: substitute CAP_SYS_ADMIN with CAP_PERFMON in error message
Date: Thu, 23 Apr 2020 10:20:52 -0300	[thread overview]
Message-ID: <20200423132052.GA19437@kernel.org> (raw)
In-Reply-To: <450d035a-c192-10e5-1c28-664ccae3e46e@linux.intel.com>

Em Wed, Apr 22, 2020 at 05:44:02PM +0300, Alexey Budankov escreveu:
> 
> Update error message to mention CAP_PERFMON only. CAP_SYS_ADMIN still
> works in keeping with user space backward compatibility approach.

This will confuse users that build the latest perf to use in older
systems where CAP_PERFMON isn't available, probably we need to, in these
cases, check for the existence of CAP_PERFMON to provide a better
warning message, something like:

  You need CAP_ADMIN or update your kernel and libcap to one that supports
  CAP_PERFMON.

For systems without CAP_PERFMON, while mentioning only CAP_PERFMON for
systems where it is present, right?
 
> Signed-off-by: Alexey Budankov <alexey.budankov@linux.intel.com>
> ---
>  tools/perf/builtin-ftrace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
> index 55eda54240fb..39d43ad02f30 100644
> --- a/tools/perf/builtin-ftrace.c
> +++ b/tools/perf/builtin-ftrace.c
> @@ -288,7 +288,7 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
>  	      perf_cap__capable(CAP_SYS_ADMIN))) {
>  		pr_err("ftrace only works for %s!\n",
>  #ifdef HAVE_LIBCAP_SUPPORT
> -		"users with the CAP_PERFMON or CAP_SYS_ADMIN capability"
> +		"users with the CAP_PERFMON capability"
>  #else
>  		"root"
>  #endif
> -- 
> 2.24.1
> 

-- 

- Arnaldo

  reply	other threads:[~2020-04-23 13:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 14:40 [PATCH v2 0/4] perf: make Perf tool aware of SELinux access control Alexey Budankov
2020-04-22 14:44 ` [PATCH v2 1/4] perf trace: substitute CAP_SYS_ADMIN with CAP_PERFMON in error message Alexey Budankov
2020-04-23 13:20   ` Arnaldo Carvalho de Melo [this message]
2020-04-23 14:49     ` Alexey Budankov
2020-04-23 18:10       ` Arnaldo Carvalho de Melo
2020-04-22 14:44 ` [PATCH v2 2/4] perf docs: substitute CAP_SYS_ADMIN with CAP_PERFMON where needed Alexey Budankov
2020-04-23 13:22   ` Arnaldo Carvalho de Melo
2020-04-23 14:51     ` Alexey Budankov
2020-04-22 14:45 ` [PATCH v2 3/4] perf tool: make Perf tool aware of SELinux access control Alexey Budankov
2020-04-23 13:27   ` Arnaldo Carvalho de Melo
2020-04-23 14:58     ` Alexey Budankov
2020-04-22 14:47 ` [PATCH v2 4/4] perf docs: introduce security.txt file to document related issues Alexey Budankov

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=20200423132052.GA19437@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexey.budankov@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=selinux@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).