Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp774801ybz; Wed, 22 Apr 2020 07:47:33 -0700 (PDT) X-Google-Smtp-Source: APiQypILcE18hRjg4TrxZXiSTuB+gBHBHFZV1XiBdO6nhu59zJsscMffAq2gGHuju1zNR9bPttfh X-Received: by 2002:a50:d98b:: with SMTP id w11mr12931183edj.196.1587566853307; Wed, 22 Apr 2020 07:47:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587566853; cv=none; d=google.com; s=arc-20160816; b=mVnoSpgrA/Nwnxyw8pDNNi3bBiVZFsHN5WYEBz5CTbUzqGe11NtNsDC9WVysxvyfUD yf6sI/etuVWvZrOj9zReieh+TOjyUlgTZ03hQodjeRzAPHn23/ITOvChfJBNKzd+vBQg qf1FFM6j9eIBMlyp9Rz1i79guq9CusSvBG7KD+iD42GKSCP/2328yf8a9TXvhH/uQnOt 2JplDaX/7MGZ73Y5GeFYV0kK8hi8IFJsp6Gf0Rcz7nEaKdYBIgGSORLgnqKiZmEqpris 5iEQ2blL55wTuWMqAhGSjU9sE8Znz/vVigFWZhSkqeVBv9Ih5J24vaR30QxjhAnc11iV hmuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:references:cc:to:from:subject:ironport-sdr :ironport-sdr; bh=3agYGk9B9Kr4UxxdkkouF6MHsD5NRkTd9o9/TeSEZQ8=; b=R9mSybIGl063mX5OmGQFHUaqv2eixHdPXBAXnlhMenZy0oaSViRjS7Ay84wAk9YzC9 uVVE1wC2yh7wB25ifR9AnmNskzRAyMuN4Oc2Yl3/mWTcK0zNNqAMYz80xtjk020ZOJvl YW4eRK/I6CZlxizFfQm9FFVJxzgRB6yrCU3oLQSUhcNKaUrTim12Px1urxLKPl2pqZx0 T7uYjSiEsajaVm6bP1TWLrttd23qawgtezOEQJq5KufcYl6q7q1LlQYiIuQRKezRMOL2 3q60ISWme4BgWfZJxzIFRJ7CCKqU7L7aues3H7lTPBsk9ZtkDgSb6SQb/DLDgm5q5vEe W9dw== 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p25si3469876eji.408.2020.04.22.07.47.03; Wed, 22 Apr 2020 07:47:33 -0700 (PDT) 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726838AbgDVOo7 (ORCPT + 99 others); Wed, 22 Apr 2020 10:44:59 -0400 Received: from mga18.intel.com ([134.134.136.126]:63947 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726018AbgDVOo6 (ORCPT ); Wed, 22 Apr 2020 10:44:58 -0400 IronPort-SDR: utVCDyUzPh+V4NRjbJt02diWMoVmVNxb6zUYj9b3N/Km0NVAkSHJh/DloBBYq0xHITqWri1eSp EpWBXQW6e9Gg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 07:44:57 -0700 IronPort-SDR: 1L91aZrf0wL+5BL4j6agU5mLFDRPbJdAcwATbeYYmRxG0ptjt1/yQAhEnUWHeBnKRtSz2lLq0P CdEq6w7fKEvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,414,1583222400"; d="scan'208";a="247481908" Received: from linux.intel.com ([10.54.29.200]) by fmsmga008.fm.intel.com with ESMTP; 22 Apr 2020 07:44:57 -0700 Received: from [10.249.227.181] (abudanko-mobl.ccr.corp.intel.com [10.249.227.181]) by linux.intel.com (Postfix) with ESMTP id D361E5802C9; Wed, 22 Apr 2020 07:44:54 -0700 (PDT) Subject: [PATCH v2 2/4] perf docs: substitute CAP_SYS_ADMIN with CAP_PERFMON where needed From: Alexey Budankov To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel , "selinux@vger.kernel.org" , "linux-security-module@vger.kernel.org" References: <66f2975b-4a69-b428-7dc5-d9aa40b3c673@linux.intel.com> Organization: Intel Corp. Message-ID: Date: Wed, 22 Apr 2020 17:44:53 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <66f2975b-4a69-b428-7dc5-d9aa40b3c673@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Substitute CAP_SYS_ADMIN with CAP_PERFMON in the docs where admin is mentioned. CAP_SYS_ADMIN still works in keeping with user space backward compatibility approach. Signed-off-by: Alexey Budankov --- tools/perf/Documentation/perf-intel-pt.txt | 2 +- tools/perf/design.txt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/perf/Documentation/perf-intel-pt.txt b/tools/perf/Documentation/perf-intel-pt.txt index 456fdcbf26ac..176597be0755 100644 --- a/tools/perf/Documentation/perf-intel-pt.txt +++ b/tools/perf/Documentation/perf-intel-pt.txt @@ -687,7 +687,7 @@ The v4.2 kernel introduced support for a context switch metadata event, PERF_RECORD_SWITCH, which allows unprivileged users to see when their processes are scheduled out and in, just not by whom, which is left for the PERF_RECORD_SWITCH_CPU_WIDE, that is only accessible in system wide context, -which in turn requires CAP_SYS_ADMIN. +which in turn requires CAP_PERFMON. Please see the 45ac1403f564 ("perf: Add PERF_RECORD_SWITCH to indicate context switches") commit, that introduces these metadata events for further info. diff --git a/tools/perf/design.txt b/tools/perf/design.txt index a42fab308ff6..6fd879440c40 100644 --- a/tools/perf/design.txt +++ b/tools/perf/design.txt @@ -258,8 +258,7 @@ gets schedule to. Per task counters can be created by any user, for their own tasks. A 'pid == -1' and 'cpu == x' counter is a per CPU counter that counts -all events on CPU-x. Per CPU counters need CAP_PERFMON or CAP_SYS_ADMIN -privilege. +all events on CPU-x. Per CPU counters need CAP_PERFMON privilege. The 'flags' parameter is currently unused and must be zero. -- 2.24.1