From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8114C4646A for ; Wed, 12 Sep 2018 06:53:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FC5620833 for ; Wed, 12 Sep 2018 06:53:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FC5620833 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727791AbeILL42 (ORCPT ); Wed, 12 Sep 2018 07:56:28 -0400 Received: from mga04.intel.com ([192.55.52.120]:19308 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbeILL41 (ORCPT ); Wed, 12 Sep 2018 07:56:27 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2018 23:53:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,363,1531810800"; d="scan'208";a="90934378" Received: from linux.intel.com ([10.54.29.200]) by orsmga002.jf.intel.com with ESMTP; 11 Sep 2018 23:52:34 -0700 Received: from [10.125.251.222] (abudanko-mobl.ccr.corp.intel.com [10.125.251.222]) by linux.intel.com (Postfix) with ESMTP id 6B5775803DA; Tue, 11 Sep 2018 23:52:31 -0700 (PDT) Subject: Re: [RFC 0/4] perf: Per PMU access controls (paranoid setting) To: Tvrtko Ursulin , linux-kernel@vger.kernel.org Cc: Tvrtko Ursulin , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , "H. Peter Anvin" , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Madhavan Srinivasan , Andi Kleen , x86@kernel.org References: <20180626153642.5587-1-tvrtko.ursulin@linux.intel.com> From: Alexey Budankov Organization: Intel Corp. Message-ID: <27559444-ca88-2c04-c85c-613116e9e51f@linux.intel.com> Date: Wed, 12 Sep 2018 09:52:29 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180626153642.5587-1-tvrtko.ursulin@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 Hi, Is there any plans or may be even progress on that so far? Thanks, Alexey On 26.06.2018 18:36, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > For situations where sysadmins might want to allow different level of > access control for different PMUs, we start creating per-PMU > perf_event_paranoid controls in sysfs. > > These work in equivalent fashion as the existing perf_event_paranoid > sysctl, which now becomes the parent control for each PMU. > > On PMU registration the global/parent value will be inherited by each PMU, > as it will be propagated to all registered PMUs when the sysctl is > updated. > > At any later point individual PMU access controls, located in > /device//perf_event_paranoid, can be adjusted to achieve > fine grained access control. > > Discussion from previous posting: > https://lkml.org/lkml/2018/5/21/156 > > Cc: Thomas Gleixner > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: "H. Peter Anvin" > Cc: Arnaldo Carvalho de Melo > Cc: Alexander Shishkin > Cc: Jiri Olsa > Cc: Namhyung Kim > Cc: Madhavan Srinivasan > Cc: Andi Kleen > Cc: Alexey Budankov > Cc: linux-kernel@vger.kernel.org > Cc: x86@kernel.org > > Tvrtko Ursulin (4): > perf: Move some access checks later in perf_event_open > perf: Pass pmu pointer to perf_paranoid_* helpers > perf: Allow per PMU access control > perf Documentation: Document the per PMU perf_event_paranoid interface > > .../sysfs-bus-event_source-devices-events | 14 +++ > arch/powerpc/perf/core-book3s.c | 2 +- > arch/x86/events/intel/bts.c | 2 +- > arch/x86/events/intel/core.c | 2 +- > arch/x86/events/intel/p4.c | 2 +- > include/linux/perf_event.h | 18 ++- > kernel/events/core.c | 104 +++++++++++++++--- > kernel/sysctl.c | 4 +- > kernel/trace/trace_event_perf.c | 6 +- > 9 files changed, 123 insertions(+), 31 deletions(-) >