public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Michael Petlan <mpetlan@redhat.com>,
	Ian Rogers <irogers@google.com>,
	John Garry <john.garry@huawei.com>
Subject: Re: [PATCH 1/2] perf daemon: Fix control fifo permissions
Date: Tue, 2 Mar 2021 09:59:00 -0300	[thread overview]
Message-ID: <YD42lFE2ijc6e3PX@kernel.org> (raw)
In-Reply-To: <20210301122510.64402-1-jolsa@kernel.org>

Em Mon, Mar 01, 2021 at 01:25:09PM +0100, Jiri Olsa escreveu:
> Add proper mode for mkfifo calls to get read and
> write permissions for user. We can't use O_RDWR
> in here, changing to standard permission value.

Thanks, applied both patches to perf/urgent.

- Arnaldo

 
> Fixes: 6a6d1804a190 ("perf daemon: Set control fifo for session")
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/builtin-daemon.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/builtin-daemon.c b/tools/perf/builtin-daemon.c
> index 617feaf020f6..8f0ed2e59280 100644
> --- a/tools/perf/builtin-daemon.c
> +++ b/tools/perf/builtin-daemon.c
> @@ -373,12 +373,12 @@ static int daemon_session__run(struct daemon_session *session,
>  	dup2(fd, 2);
>  	close(fd);
>  
> -	if (mkfifo(SESSION_CONTROL, O_RDWR) && errno != EEXIST) {
> +	if (mkfifo(SESSION_CONTROL, 0600) && errno != EEXIST) {
>  		perror("failed: create control fifo");
>  		return -1;
>  	}
>  
> -	if (mkfifo(SESSION_ACK, O_RDWR) && errno != EEXIST) {
> +	if (mkfifo(SESSION_ACK, 0600) && errno != EEXIST) {
>  		perror("failed: create ack fifo");
>  		return -1;
>  	}
> -- 
> 2.29.2
> 

-- 

- Arnaldo

      parent reply	other threads:[~2021-03-02 15:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 12:25 [PATCH 1/2] perf daemon: Fix control fifo permissions Jiri Olsa
2021-03-01 12:25 ` [PATCH 2/2] perf daemon: Allow test for non root user Jiri Olsa
2021-03-02 12:59 ` Arnaldo Carvalho de Melo [this message]

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=YD42lFE2ijc6e3PX@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=john.garry@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=mpetlan@redhat.com \
    --cc=namhyung@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