Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp55682pxb; Tue, 2 Mar 2021 18:59:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzM9mT0tXYUDZDG5V6H7BTqz/2zSrMOJIXmlrqT+kPSQWalVLISYL0UErh+Dnu0jAfs2XhZ X-Received: by 2002:a17:906:6095:: with SMTP id t21mr23538206ejj.384.1614740384570; Tue, 02 Mar 2021 18:59:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614740384; cv=none; d=google.com; s=arc-20160816; b=PH2bmAA1ec80y2U0RuM2gCbVlSZaIaVAGe//wFKf5z/Y/JZdoLTmbCj2hZdzxCrAHk ui1/x5EBNk3VM6nuDPa4js5+1IB5fq0MB5GwKce94RwDrPUjEwAy2nHjb8z6N8/Se4H1 o9zb2tWPBIBvP9OQJE5mzJ+IqlKjpKoo0eDFG6AlxOnhFSVfzPlQB9TJiLs+MUdxj6lA se0/htoMfRBhVb1U5DcsnA3BdkPkMOthR5zG71xz3pUOdQmIrp6P58fIuzaODJXqWlYI pg8hFqn1P+tfyJDW24TZ5XvU3wFtkiALpzJZ885vgYGdxWsqSe3BrvcGfpxyylLQerNM 7JjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Mj5aROTxavG+y+U/s4Xnr42voAyBXtkWLpApQoyd6JY=; b=HQ24Kh5m96XbGxeemzxdLj8Kt/yBUiZQbXoyClpvevc3QUuh2LCgNnnxYYiX3AeSry nQonwJ9Ylh3FVn3U/j9iiiAHm2txv2siHvw6IrEF3FE9xfl/EGgab3EQz+4IKHK1RhJz zZ/FZMsFrPqGRbnXOk3IrsuFTRfb3r746jDYd+4mb+xgGBkcbxkZhf9uWd1DuV8oPKyy CuTvEkVsmHCalkW0u9QFVYk2pjIlCPTNuMZJguNsNjrV6N7RqSuEacd8i3+y6IyUm51S HpDJKOd1dlbT3evVUzQrOHPdKkni9vhkoP8XwDlBXqTpZ4Ut2NtPzAglm8tnfRnUeSUt Eosg== ARC-Authentication-Results: i=1; mx.google.com; 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 rh28si11143146ejb.494.2021.03.02.18.59.15; Tue, 02 Mar 2021 18:59:44 -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; 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 S234917AbhCAM0K convert rfc822-to-8bit (ORCPT + 99 others); Mon, 1 Mar 2021 07:26:10 -0500 Received: from us-smtp-delivery-44.mimecast.com ([207.211.30.44]:40014 "EHLO us-smtp-delivery-44.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232916AbhCAM0J (ORCPT ); Mon, 1 Mar 2021 07:26:09 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-169-104ZsfRXMPm6wNdxme02Bw-1; Mon, 01 Mar 2021 07:25:15 -0500 X-MC-Unique: 104ZsfRXMPm6wNdxme02Bw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BD6FDDF8AD; Mon, 1 Mar 2021 12:25:13 +0000 (UTC) Received: from krava.cust.in.nbox.cz (unknown [10.40.192.173]) by smtp.corp.redhat.com (Postfix) with ESMTP id 501465C232; Mon, 1 Mar 2021 12:25:11 +0000 (UTC) From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Ian Rogers , John Garry Subject: [PATCH 1/2] perf daemon: Fix control fifo permissions Date: Mon, 1 Mar 2021 13:25:09 +0100 Message-Id: <20210301122510.64402-1-jolsa@kernel.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: kernel.org Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset=WINDOWS-1252 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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