Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5045073imm; Tue, 11 Sep 2018 23:54:09 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYj+o/NPZJQgGOWpyCQCbyeoXFKfVrJSPUV6cxyHv+fFUcYww9bw+9bX8zltqYartofnQ0l X-Received: by 2002:a17:902:4124:: with SMTP id e33-v6mr531610pld.48.1536735249295; Tue, 11 Sep 2018 23:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536735249; cv=none; d=google.com; s=arc-20160816; b=HHHgf7K9rQJQMUJLfa6Djx2pyZFSkGGaK9XGK7eUnxxJgPSXQxL5gyMlrbRtinPFiO fEiJ8pHfOappoH/I1Y8aiVNq3FVZ/52kHfar/WfJo8XdmbPwKgssu/EYfet2JNDgi8SA 47F0H4AkL7JGAOYILzdpdc2DTkX+R0mtSAqKoq1r+bVht2XzQP7uUsnZ3oO2HKM6Xe1K s4VqMi86OVEVVly9oO6Pny7ANFWdx3i3hWB5u45SmZE2JROLYUY6GtU0W1ocAl/Qnlsb CCkeCm/yWYaQ94WH7OCbUYo/PQ9qz56+c9xAHT5++8jfL7gjr2KbDy3qJOyexIETk7fV Dgiw== 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; bh=t8MO+wf5Zv5SDnpczdnU7BKO2lSz7UCt6g5OjID78jM=; b=UiBJ2G/M7xd+e9KIuVA4jJwGeBUK70qLVUIrysRo0bTPjp/RwOKIHUfXXoZ/5CmBw6 fIN/WO/JPdTLAJ4kSYnnVxUl98eKEnwuBQnAIqG20X6f89ljw4wytLjlGFbTNAsa2q1J XeF+q+TZK2UaBmtJE2reP/oMWpxqz2bwY/beRhftGIJqv+HmBFU7pPxNZMuNiqJwKev7 z4igFilG8Oe/3rd4KpD1BOPbivbTkOGc8aywwIzevTQU6WVTaTOtmWCcfUwGGG47Dh9n TC0NBI5YdXzdCJ9iPxW4p87jwtp8B5xoFWJm4AU95QqHUIXmhI2WOwmdUfoeOzHg9zPc afCQ== 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 a75-v6si162419pfc.106.2018.09.11.23.53.54; Tue, 11 Sep 2018 23:54:09 -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 S1727786AbeILL42 (ORCPT + 99 others); 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(-) >