Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1106394ybl; Wed, 11 Dec 2019 12:37:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxfi4KxXOBXKlR79t1UKy81ziRLUHdiYbnWoI6VCe45ePPGely/ta1fUZSWHKjuRPZIzUqc X-Received: by 2002:a05:6830:2110:: with SMTP id i16mr3717104otc.337.1576096652100; Wed, 11 Dec 2019 12:37:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576096652; cv=none; d=google.com; s=arc-20160816; b=swYHSOuTtE2Zz2sACEEF5tljRNUI0jGWjD64a96R6sSskTkDr94mMgOfvg9y4VyhJG 7NMLMe408/u7Y6japVBLysWTFI7t6bOPzpeXjLFksXt/NtDYZGwQDlYEDyNUESzx3K2z Q2mfkytlYWC1st4eWqI3LPJZwzU9p2h2dRcTCPVAcP0ib6vWDF3vtQ6jMjl7O0l2dLr4 vz88mpVRXAHUwuP+pSf8i98+FJQjSI6cgn+mFBMGMckXkle4WMWq4nB8B4wmLNQIwNeJ 80atDgU0asWVFkNe1FFbirveolQYkE1LiByNkhKYSrMVwA1lJOjcXyxM7WIMiyHqgCcG 3NTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=y2AHDpR/avf0laxTIKcn7m2q/br3h5qxH6Le1vHFj70=; b=HS4k3Hvf6+9baQ8Z5B2yOCVNGjz9paSRpID8SH8khxxdWHHIRsIubkUWjBGxWlGrP8 mLgQOfF+8cuxV/ndz6YdpfxpaDN5tTh46rQArqnfg3XBz7jWAwo8ekP4bZQanHXZSqNf xuTsStX0RJuXg8cLQLnUlpmflbWifetnaSOPSFCwaet6dlUGaZRaAd6prSTptWSgQbAR yHyfnarR4ua39k7PotEpdj+pFGVAw/KAYMAosN2e/t3KzKWX03RsNAYoVE3Bh8D2+kCn 9aLN9pshTUktwDui/Vp27bqSn6uAFpdX+dzRw4TZH45jBf9C66NQX41i0HNJxPCfmjop znBA== 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 d13si1815338otp.196.2019.12.11.12.37.19; Wed, 11 Dec 2019 12:37:32 -0800 (PST) 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 S1727525AbfLKUgt (ORCPT + 99 others); Wed, 11 Dec 2019 15:36:49 -0500 Received: from mga01.intel.com ([192.55.52.88]:40267 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726242AbfLKUgt (ORCPT ); Wed, 11 Dec 2019 15:36:49 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2019 12:36:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,303,1571727600"; d="scan'208";a="210845460" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.21]) by fmsmga007.fm.intel.com with ESMTP; 11 Dec 2019 12:36:48 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id 7EAA2300FF1; Wed, 11 Dec 2019 12:36:48 -0800 (PST) Date: Wed, 11 Dec 2019 12:36:48 -0800 From: Andi Kleen To: Casey Schaufler Cc: Alexey Budankov , Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Jiri Olsa , elena.reshetova@intel.com, Alexander Shishkin , Jann Horn , Kees Cook , Stephane Eranian , Namhyung Kim , linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-kernel Subject: Re: [PATCH v1 0/3] Introduce CAP_SYS_PERFMON capability for secure Perf users groups Message-ID: <20191211203648.GA862919@tassilo.jf.intel.com> References: <283f09a5-33bd-eac3-bdfd-83d775045bf9@linux.intel.com> <1e836f34-eda3-542d-f7ce-9a3e87ac5e2e@schaufler-ca.com> <16e9e399-2ebf-261f-eee5-cf9ace2a82b9@schaufler-ca.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16e9e399-2ebf-261f-eee5-cf9ace2a82b9@schaufler-ca.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > In this circumstances CAP_SYS_PERFMON looks like smart balanced advancement that > > trade-offs between perf_events subsystem extensions, required level of control > > and configurability of perf_events, existing users adoption effort, and it brings > > security hardening benefits of decreasing attack surface for the existing users > > and use cases. > > I'm not 100% opposed to CAP_SYS_PERFMON. I am 100% opposed to new capabilities > that have a single use. Surely there are other CAP_SYS_ADMIN users that [cs]ould > be converted to CAP_SYS_PERFMON as well. If there is a class of system performance > privileged operations, say a dozen or so, you may have a viable argument. perf events is not a single use. It has a bazillion of sub functionalities, including hardware tracing, software tracing, pmu counters, software counters, uncore counters, break points and various other stuff in its PMU drivers. See it more as a whole quite heterogenous driver subsystem. I guess CAP_SYS_PERFMON is not a good name because perf is much more than just Perfmon. Perhaps call it CAP_SYS_PERF_EVENTS -Andi