Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2447683ybb; Sun, 5 Apr 2020 07:47:52 -0700 (PDT) X-Google-Smtp-Source: APiQypL3WAwWDhCSLf5ZT4HnfBPQlC2fVgBdpDPPvQLNtDNIUSsJbXUHHpoMtY7SK1cCRVzmsC5K X-Received: by 2002:aca:cf8a:: with SMTP id f132mr9290399oig.151.1586098072346; Sun, 05 Apr 2020 07:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586098072; cv=none; d=google.com; s=arc-20160816; b=rslxFaB4fYl2VB7CQYV9pWkc1gQ/2fn1x9s93WO85nZJcERGlB18g6SfqYg8E/vkvm g9nC0bLun9QxjOJuJJ4R80wWlECl15f+JXT6p1JIZRH0mYtUTy80n16d9QoSQ7c2I0zk A7+1iULt5XVvDhxECR3dOfhkDdv0vmC1YkR2hWcF/UifAIPWEq5qrPA+VnyD2BFrC13v peadxk9OSk382dCJC8srAhhTZ8hJlq9w7ZzUvVUovcAyJn7RthZQc8wbO7NKpU+v45TI huLrM7fSc5ItP29VtIznZ6oqLRp7nudQpinfGYwgl83N6AAphLR5YaP5OJL0aGhaGG0k CbjQ== 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:from:references:cc:to:subject:ironport-sdr :ironport-sdr; bh=fTqpi25iKX1JSC8lEag9V7LwLxAauqd1IiU0yr3w04I=; b=GvXwWMIfTxkmEdnlmR09aH9dtyTFLLqRmtwCeu19FlwHvm/a1G/Xc2ugkNg9kF/dVh thjZslCU1iA+U7A7TGDpUJ00so9rjzJb1jEb/Y+CnyGIbMsRq4ThywpQk+hhJXCPwlhi ULI2EYWLq7vJpseyw+AKvu1EWxi/Wr6J8o/Y8uNyvThJfQ8ELPu6JiPpoOGiiuegmpN6 wncAFxO5HSxAYRUApyeB9QnfAsEUFmU/MT6JaVwskiNNerrE7N88a8MH7o/m/FvIjmip NNyIaZPa1U8Xpbjjybbz37wkVVjPhUZ5McX23DUPN5rG0XApfIq4YOWDgOyTkCCHgJGb +/6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id z6si6478926otm.218.2020.04.05.07.47.39; Sun, 05 Apr 2020 07:47:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726948AbgDEOlz (ORCPT + 99 others); Sun, 5 Apr 2020 10:41:55 -0400 Received: from mga09.intel.com ([134.134.136.24]:24011 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726598AbgDEOlz (ORCPT ); Sun, 5 Apr 2020 10:41:55 -0400 IronPort-SDR: S4cGvXSxi2/klGoN29F4rMj4gO96mp8JnGa2AxfhgzemCc3rLlzIfxE3o6fAi+dURw9letqoSl 5Z0TxiznpJgA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2020 07:41:53 -0700 IronPort-SDR: V9TTnqMqeP8/mt/DnG2oD1FLvKhWCmWRQBS8RDGukSKATPDRkrkgsVQd86I7vpAYDNMB3ztthq YPmkBeqaY/pQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,348,1580803200"; d="scan'208";a="243901790" Received: from linux.intel.com ([10.54.29.200]) by orsmga008.jf.intel.com with ESMTP; 05 Apr 2020 07:41:53 -0700 Received: from [10.249.231.111] (abudanko-mobl.ccr.corp.intel.com [10.249.231.111]) by linux.intel.com (Postfix) with ESMTP id 653B058033E; Sun, 5 Apr 2020 07:41:49 -0700 (PDT) Subject: Re: [PATCH v8 12/12] doc/admin-guide: update kernel.rst with CAP_PERFMON information To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Alexei Starovoitov , Ingo Molnar , James Morris , Namhyung Kim , Serge Hallyn , Jiri Olsa , Song Liu , Andi Kleen , Stephane Eranian , Igor Lubashev , Thomas Gleixner , linux-kernel , "linux-security-module@vger.kernel.org" , "selinux@vger.kernel.org" , "intel-gfx@lists.freedesktop.org" , "linux-doc@vger.kernel.org" , linux-man@vger.kernel.org References: <84c32383-14a2-fa35-16b6-f9e59bd37240@linux.intel.com> <20200405141029.GA16896@kernel.org> From: Alexey Budankov Organization: Intel Corp. Message-ID: Date: Sun, 5 Apr 2020 17:41:48 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200405141029.GA16896@kernel.org> 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 On 05.04.2020 17:10, Arnaldo Carvalho de Melo wrote: > Em Thu, Apr 02, 2020 at 11:54:39AM +0300, Alexey Budankov escreveu: >> >> Update kernel.rst documentation file with the information >> related to usage of CAP_PERFMON capability to secure performance >> monitoring and observability operations in system. > > This one is failing in my perf/core branch, please take a look. I'm Trying to reproduce right now. What kind of failure do you see? Please share some specifics so I could follow up properly. Thanks, Alexey > pushing my perf/core branch with this series applied, please check that > everything is ok, I'll do some testing now, but it all seems ok. > > Thanks, > > - Arnaldo > >> Signed-off-by: Alexey Budankov >> --- >> Documentation/admin-guide/sysctl/kernel.rst | 16 +++++++++++----- >> 1 file changed, 11 insertions(+), 5 deletions(-) >> >> diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst >> index def074807cee..b06ae9389809 100644 >> --- a/Documentation/admin-guide/sysctl/kernel.rst >> +++ b/Documentation/admin-guide/sysctl/kernel.rst >> @@ -720,20 +720,26 @@ perf_event_paranoid: >> ==================== >> >> Controls use of the performance events system by unprivileged >> -users (without CAP_SYS_ADMIN). The default value is 2. >> +users (without CAP_PERFMON). The default value is 2. >> + >> +For backward compatibility reasons access to system performance >> +monitoring and observability remains open for CAP_SYS_ADMIN >> +privileged processes but CAP_SYS_ADMIN usage for secure system >> +performance monitoring and observability operations is discouraged >> +with respect to CAP_PERFMON use cases. >> >> === ================================================================== >> -1 Allow use of (almost) all events by all users >> >> Ignore mlock limit after perf_event_mlock_kb without CAP_IPC_LOCK >> >> ->=0 Disallow ftrace function tracepoint by users without CAP_SYS_ADMIN >> +>=0 Disallow ftrace function tracepoint by users without CAP_PERFMON >> >> - Disallow raw tracepoint access by users without CAP_SYS_ADMIN >> + Disallow raw tracepoint access by users without CAP_PERFMON >> >> ->=1 Disallow CPU event access by users without CAP_SYS_ADMIN >> +>=1 Disallow CPU event access by users without CAP_PERFMON >> >> ->=2 Disallow kernel profiling by users without CAP_SYS_ADMIN >> +>=2 Disallow kernel profiling by users without CAP_PERFMON >> === ================================================================== >> >> >> -- >> 2.24.1 >> >