Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp955659pxb; Wed, 3 Mar 2021 22:25:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEcTGGXTGcJ60O1zrAFmzUyHADaYc4y1SGjXAf9wuPj9KnEoAShNjOBPU/Pbm3s4fR9bLS X-Received: by 2002:a17:906:a86:: with SMTP id y6mr2589235ejf.354.1614839140810; Wed, 03 Mar 2021 22:25:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614839140; cv=none; d=google.com; s=arc-20160816; b=uuvFayU2Vz8oT38VvXyOijgJon13VI5PLFbc39/kvwJsegXMd/Raq+qIzzb6TAy2Em b5GImmKo5snqPBLeCUxUl8MU14k2qUjHUWPYJ476fZoSVoQ1bMUDeLCOS03u+/8dDwBT 2GwqBXr7czMvl7OfI9mhZTNVhM1F61ae0K2B3qyAU8eqIpOUP6MmQPCNIAU2sPz/bpHP iEsOt0Yv/OkowtLy1vKk5a1aOrouS+54fh4/UmRXeI86PECtd22oxn9HBisiHOo2NU1e EdQxw4RPfzzecZzLgKDdz/kmpGuKiegPQGWBPMg3jTzkcZOomgOnsbMAV1gr2Y509sND iiTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=N8dOLSs2+fdu2rW04UV8aI81sCbsMGFM1pYHnm03oGI=; b=byrTRMVFE6MQJrpxDyfwumY2cUK0wrQG4j1sgyWm1yGoS3dM1s6aKwBD3aLyxRp43Y MVpevtkHE+T7KuYw3hct+KZFUgrRPeHwixiRyhfbZ96QYYmdGirF+Kar8m/bLWJO4Izn vQ3nBEm+Ha4B0uFuyPA2PuqLQ1VN+biw1Jimr546M0JVfEBuo24EYfoiHs8XNiCOv2s3 EU3pJuQH58kkzy7QrHuOxJhe/zSdR2fSEaiRYQDPfayhT60wKzxiuv3GerY8kMcZfvJh rGi5GK+7zbAU8mqqtNp7op06S5Dv1U+7PbvnFQW6w1omrC/rEVodYR6Mq3Um4hcoCrFF Nc2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="XEH/41EB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si1470400ejf.242.2021.03.03.22.25.18; Wed, 03 Mar 2021 22:25:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="XEH/41EB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1578845AbhCBP12 (ORCPT + 99 others); Tue, 2 Mar 2021 10:27:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:60024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383974AbhCBM7o (ORCPT ); Tue, 2 Mar 2021 07:59:44 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7E76B61494; Tue, 2 Mar 2021 12:59:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614689943; bh=rD8t6WOfsd8DzSjihfIj/2ve47wp6Xsu2pLKj/pQMOw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XEH/41EBMntlD3kje4wW7jDLlpKlVaRtHooGqLHQ+TisMrAzma1UMaZrthGJL321B /7B+JeR4bDmYTQ/pXTOr9M6a4ZKFhv8GiRrPeLeoPKvDM/9TcWThgoi1e23nUX6by/ AqmMjaOfl49xQ0vs/yqIm+MWZ5Gv1UKU9Ec6oD7o45bcwwMsZ6gA91C8AA7vm2bXtp mBKuYcsYxMRCBGPwxed5Q5391LS2Rlruw9TT1S8U1NLAAcWj9Z0c8eQgcQSHBsVRxf fML+VSD3PvxeUexY8mT+Hk4IoA8vXYVMZ1dEM0alL7joQKVmhZadub83KFgKOHtZcj 6IlDQrqZ9F4Hw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id D7D8040CD9; Tue, 2 Mar 2021 09:59:00 -0300 (-03) Date: Tue, 2 Mar 2021 09:59:00 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Ian Rogers , John Garry Subject: Re: [PATCH 1/2] perf daemon: Fix control fifo permissions Message-ID: References: <20210301122510.64402-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210301122510.64402-1-jolsa@kernel.org> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.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 > --- > 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