Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2423052ybb; Sun, 5 Apr 2020 07:11:20 -0700 (PDT) X-Google-Smtp-Source: APiQypJu/BLxWbnFUQlcWfVYVQLRhbMZDH4hT0+4U9DiRZ/X1ztzU3ZvrMTKtDWhYHJGif4NZ4Bs X-Received: by 2002:a05:6830:1ad4:: with SMTP id r20mr14627745otc.316.1586095880505; Sun, 05 Apr 2020 07:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586095880; cv=none; d=google.com; s=arc-20160816; b=aWwFYWrzxBHJzmM23cjrsBxP4ucQSXUm0m5X/Vz0onNgfEYIrnaTsH21Ygr3xVL8t0 VGALOkmKfLS5OFVsxqACmoByzrke0Tah+Gbv/MdF6k9UuJ4wJNRxjJYEvfyTABKK5Psj XPzdikVP2euY/0lxdwvIX1QDOqbDj4vB26F9jst4Nx6HQ0XVMnwpQZQ6fQlpQgRfKUk5 gcUwCsbNvV6KbBhJx6DLq/D2VLtsN5HW23GemGHpPfHgvI4KEWTF5DOUlk3lNdMojbDw 5atAPEo+2P2ZPuHOTkABiYEHTyVfKEqNJIUTd2fvQ/LcbGUCXbdq4rCn9BSNEtQPrTn1 oIcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=Fj5IkYeTwvEQJU3mrvn13eBZKNJ+9tUvL96085xGJxE=; b=m1QZSh2RTEtNNOM2aWDc8kO3ptvo2S0PNsJR8XDflYxvUahyE0Cr5GG48eQQDFaXq+ VSBs5oKwFDvfSaFdBvEP3UEnEo+VTu1lBnzKSdxXUfLqMrwnJJpuB1OqdWetIO3WSGdH wCo7S+MaU/+3sqWJuDaZZILXrrUmzbatXjA3p+pluQkYggEL+H3YpSmWIQPG5A+Blc3j iirZTCoKGS96cS0axGxWeRaISJ2Sl2GJrPagrc3n9s41VPMDU3Yybh2d8JZG33T+lHp7 XCrzGYse2lDtBgEoyTc/V5ei4pYFqI3nTvGIw1zAVtKbnkn0W7wU69be51/rIYjIQ8UE OpjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PUXZHGoa; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si6156974oig.220.2020.04.05.07.11.07; Sun, 05 Apr 2020 07:11:20 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PUXZHGoa; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726692AbgDEOKf (ORCPT + 99 others); Sun, 5 Apr 2020 10:10:35 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:40512 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726410AbgDEOKf (ORCPT ); Sun, 5 Apr 2020 10:10:35 -0400 Received: by mail-qt1-f195.google.com with SMTP id y25so10637537qtv.7; Sun, 05 Apr 2020 07:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Fj5IkYeTwvEQJU3mrvn13eBZKNJ+9tUvL96085xGJxE=; b=PUXZHGoaZxdIN6d3dLITTVmOMYMyzD1WzUovhblIhnH0+gX1MNWpAzLXCQgk2kjb4r MlJo8+N8G03Sa1hMX0SzavAQvly8jLAQ+hbQperFpamXKFXDtOKZO1KBx7z3QF7jU4DN v2O2rih9I491tXxgjaiA8y75O5NeuTOBTrBD5lyOIL+4LBqVTqjlPgB8IOP+vdkio7Ne OF0/t3wAwc/c/4fhcxK0mgit6koSfOKh3e8xFvAUuaInvIs+DvGpC7Qx4f3FaJ6/exvW RQ5WEGhuuoq8VdPrvO9ejeK2M4qtHC7mPdoXm5yO6XzAi2YIMIwcRWsAHg60RLTYDgVS MEwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Fj5IkYeTwvEQJU3mrvn13eBZKNJ+9tUvL96085xGJxE=; b=CUbM8n9R1BIZ509Zn+V4YwkO3TbRgDHl/e8ettddQvDgRBSjvtYKV+0W63VoKCnB/1 NwS8rpTK2ysXVSFf5ZjxX4EDRvFzxuBm9xtVYgjPo0WxkoQXUKgZN4REB1NZHBIU98of bGVLwmeDrVstBWhjYWkyz4OmUZPLCvZx3Kf7sijDMAtaeo/snNdvj/uoca3hVtvzXfPs dE9whIHKThHT79pOaKj7ExC19aWNIZX0k8Prev9Q/4e1z5uxlKp/CUwkbPdKFc8+HP8y LwoXGcqdVT+nBtz+KCgry7NE7kyiuJI0e/rM1cyjxCPofrIBoz6wLTKMO6PxvYQfEMjt fSlQ== X-Gm-Message-State: AGi0Pua+CmfbzlG7fB/wdGUvXnQkhezH2Fup34fegx1aH8V4y4uM0mNk g9Wx9qXKBcLSurIO+F4lHno= X-Received: by 2002:aed:2435:: with SMTP id r50mr16393370qtc.314.1586095833851; Sun, 05 Apr 2020 07:10:33 -0700 (PDT) Received: from quaco.ghostprotocols.net ([179.97.37.151]) by smtp.gmail.com with ESMTPSA id 6sm9452806qkr.25.2020.04.05.07.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Apr 2020 07:10:32 -0700 (PDT) From: Arnaldo Carvalho de Melo X-Google-Original-From: Arnaldo Carvalho de Melo Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id AE02E409A3; Sun, 5 Apr 2020 11:10:29 -0300 (-03) Date: Sun, 5 Apr 2020 11:10:29 -0300 To: Alexey Budankov 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 Subject: Re: [PATCH v8 12/12] doc/admin-guide: update kernel.rst with CAP_PERFMON information Message-ID: <20200405141029.GA16896@kernel.org> References: <84c32383-14a2-fa35-16b6-f9e59bd37240@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <84c32383-14a2-fa35-16b6-f9e59bd37240@linux.intel.com> X-Url: http://acmel.wordpress.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 > -- - Arnaldo