Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5675921imm; Wed, 12 Sep 2018 09:24:03 -0700 (PDT) X-Google-Smtp-Source: ANB0VdakQwzS+E662KdG0Wnp1bIEk7IVd/UgqRF2xKGKVa8CO9hhFlIAYP2iFhMTY2kE0bM2DDut X-Received: by 2002:a63:ec14:: with SMTP id j20-v6mr3218450pgh.28.1536769443547; Wed, 12 Sep 2018 09:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536769443; cv=none; d=google.com; s=arc-20160816; b=ND6sw415dCpXkuB57MimfaKAk2lFXvygTA+aY0+hOFiDFqfiV5cIGIKni03Fec9T8R nZ8oWRFGPLBIyHtPjv5Ar+pK4l2zCJVET6Z8KTey8f/d80JWKoOVr52BRyeEMyLpBwJc mNMkeVdAiQmrNz9UYV5sEbVkzOOZmAHAws6rZXH2tSHSLsAb36iYnVTh+Dcz3+tT2F/m 89Bweamb1XcquWMFuerzjbum+cjWWRykU8gXT7IOp1S68kbRrjf/AQlC8WvKtW79tcd/ 3KOn+RhEhobAUyxd3Q4xRX0D5ZnrVEyUPbVpA6kaBkRVUQhemDOgot4oitiN5/F3XwYX vUFg== 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:references:cc:to:subject:from; bh=ZR7xK+BdD0ERBn3nDbAJ9vNJ7zR6W4XhRDnRYhuJEG4=; b=PaBFLBiyzy8DHWwdFinqjeLxvpS5ZwsKEq1TrFcRtoLWRaCxYJDEYTRz6YLMlCPn4/ d+nxje/uNqWboSx13pZRsgEXdij9q7emxbdJLuSRIhAScI0omkRDxyL4B//WC58M0XTZ qDgZUHsmzgnp4SADI8J5HHqy98yZy/1AAmZe80yjQns0gRaLUTQc5TwcuVeXLsNwPiJS JAkxszfJV/fBn8YXb1W85Fj5YTv4LGTRNik72Q41bCQgqPWB8eKgsolk1OEa6YobE9cO sKDQq8ebkzHCKkNBsQhvH3QkG34D/DnG95A05FydrmNcLzcpCKzrb3/dZKMpG7GGSAt2 P22Q== 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 z25-v6si1418710pfm.152.2018.09.12.09.23.04; Wed, 12 Sep 2018 09:24:03 -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 S1727391AbeILVYq (ORCPT + 99 others); Wed, 12 Sep 2018 17:24:46 -0400 Received: from mga01.intel.com ([192.55.52.88]:2102 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726798AbeILVYq (ORCPT ); Wed, 12 Sep 2018 17:24:46 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2018 09:19:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,365,1531810800"; d="scan'208";a="89415370" Received: from linux.intel.com ([10.54.29.200]) by fmsmga001.fm.intel.com with ESMTP; 12 Sep 2018 09:19:27 -0700 Received: from [10.252.21.7] (abudanko-mobl.ccr.corp.intel.com [10.252.21.7]) by linux.intel.com (Postfix) with ESMTP id 91AFE580332; Wed, 12 Sep 2018 09:19:23 -0700 (PDT) From: Alexey Budankov Subject: Re: [RFC 0/4] perf: Per PMU access controls (paranoid setting) To: Tvrtko Ursulin , linux-kernel@vger.kernel.org, Peter Zijlstra , Jiri Olsa Cc: Tvrtko Ursulin , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Arnaldo Carvalho de Melo , Alexander Shishkin , Namhyung Kim , Madhavan Srinivasan , Andi Kleen , x86@kernel.org References: <20180626153642.5587-1-tvrtko.ursulin@linux.intel.com> <27559444-ca88-2c04-c85c-613116e9e51f@linux.intel.com> <3361d8e1-50a0-2404-78cb-b83ca345b565@ursulin.net> Organization: Intel Corp. Message-ID: Date: Wed, 12 Sep 2018 19:19:21 +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: <3361d8e1-50a0-2404-78cb-b83ca345b565@ursulin.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 12.09.2018 11:41, Tvrtko Ursulin wrote: > > On 12/09/18 07:52, Alexey Budankov wrote: >> >> Hi, >> >> Is there any plans or may be even progress on that so far? > > It's hanging in the back of my mind. AFAIR after last round there was a build failure or two to fix on more exotic (to me) hardware, and Jiri Olsa provided a tools/perf snippet supporting the feature. > > But essentially I haven't done any work on it since due not seeing the route to upstream. :( In other words, will someone review it and will that r-b make it have a chance of getting into some tree. If I had a clear statement from someone with authority in these aspects I would progress it, but otherwise it felt like it's not going anywhere. Got you, Tvrtko, thanks! Folks, are there any concerns still remain? design, review, testing? Please let us known of any required assistance to move it forward. Thanks, Alexey > > Regards, > > Tvrtko > > >> 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(-) >>> >> >