Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6176349ybv; Tue, 18 Feb 2020 11:24:03 -0800 (PST) X-Google-Smtp-Source: APXvYqzoZ9RoYEZlra56kK/8R3/Y5dwDiMhzqpFwLgo9hQ+PvBrnG6RHQWQ8xviyqINLDy825FQu X-Received: by 2002:aca:5f87:: with SMTP id t129mr2313292oib.36.1582053842892; Tue, 18 Feb 2020 11:24:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582053842; cv=none; d=google.com; s=arc-20160816; b=VMSJXV6D/JQnxlQAOeWEATkr9l8jnHb8LUuj/Et0KmtbXEMoncQv+4logyLzk2ns6L 3PI09tSeVBKvOYmEXXbIhrLYQT6JpcstNisZcyjKd8ruiwm+RFXlPnrwKzaJ4FiL49vL BVXmo7uDB8/n24JLXLZLRKPDuz+7tXoohZ2Ef/ZZ0XO+cRzZStEN98eaIN6gZKXiplkL S4K5IQKi6MgrKDoKBSM3C0XRreJAGe44C73xkDjVT+aSr9o+bCToZuUoql+/wVR9ju+R Suba/j23rdbZg7TcBI3WCaYlflm5/XQC28sUu+pFALqxIMPcpp3d1MdDbkJRtXvEn7Cq pRGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=DT9naZqKs/CaULEqz2EpP9KkM72ybgKWmbKrdZ2vBp4=; b=lABdhqBCVm3WQkxsZnscwyUxlDQHnx7hr46/hL0QwObKdiaIVSciln/HCSnLbh8aLm NY//LcpDl9ZVx3sxf/CryeAcnSLRX2XI0+r+3FMyQWIdn8LXYHGlAqu6zMalgegeDFUS 8E+tGeIpbkkO0Z2zhVHKezkyUDbHjnoEzv3OWxGggOS4g5103/yAMWdrP9OYlWBh32G9 JJetvE9sFoO9pnAXxQaU/+Ai5m0sBkhMcUOjlZqaAunHzGo0gZzsUztRL7hqyOqtLilb 72Fzpe1y4RYZ5zjchUUYwAgfoel85hMKXihNNtjC9vAKED9rMMgLz+BnPHGvvmhWfm4v LDiw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w29si2388533oth.313.2020.02.18.11.23.50; Tue, 18 Feb 2020 11:24:02 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726582AbgBRTXI (ORCPT + 99 others); Tue, 18 Feb 2020 14:23:08 -0500 Received: from namei.org ([65.99.196.166]:46584 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726346AbgBRTXF (ORCPT ); Tue, 18 Feb 2020 14:23:05 -0500 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id 01IJMJhB013131; Tue, 18 Feb 2020 19:22:19 GMT Date: Wed, 19 Feb 2020 06:22:19 +1100 (AEDT) From: James Morris To: Alexey Budankov cc: Serge Hallyn , Stephen Smalley , Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , "joonas.lahtinen@linux.intel.com" , Alexei Starovoitov , Will Deacon , Paul Mackerras , Helge Deller , Thomas Gleixner , Andi Kleen , Stephane Eranian , Igor Lubashev , Jiri Olsa , linux-kernel , "intel-gfx@lists.freedesktop.org" , "linux-security-module@vger.kernel.org" , "selinux@vger.kernel.org" , linux-arm-kernel , "linuxppc-dev@lists.ozlabs.org" , "linux-parisc@vger.kernel.org" , oprofile-list@lists.sf.net, "linux-doc@vger.kernel.org" , linux-man@vger.kernel.org Subject: Re: [PATCH v7 02/12] perf/core: open access to the core for CAP_PERFMON privileged process In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 Feb 2020, Alexey Budankov wrote: > > Open access to monitoring of kernel code, cpus, tracepoints and > namespaces data for a CAP_PERFMON privileged process. Providing the > access under CAP_PERFMON capability singly, without the rest of > CAP_SYS_ADMIN credentials, excludes chances to misuse the credentials > and makes operation more secure. > > CAP_PERFMON implements the principal of least privilege for performance > monitoring and observability operations (POSIX IEEE 1003.1e 2.2.2.39 > principle of least privilege: A security design principle that states > that a process or program be granted only those privileges (e.g., > capabilities) necessary to accomplish its legitimate function, and only > for the time that such privileges are actually required) > > For backward compatibility reasons access to perf_events subsystem > remains open for CAP_SYS_ADMIN privileged processes but CAP_SYS_ADMIN > usage for secure perf_events monitoring is discouraged with respect to > CAP_PERFMON capability. > > Signed-off-by: Alexey Budankov Reviewed-by: James Morris -- James Morris