Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5149302imm; Wed, 12 Sep 2018 01:42:05 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYNkBNkA0Crr1Z9l4pyRdcZALc0Hhu7BoTngjoGRcNIVAq8NPlVEnqhYTFBYCdY/hh/5Oxf X-Received: by 2002:a63:c807:: with SMTP id z7-v6mr927025pgg.77.1536741725365; Wed, 12 Sep 2018 01:42:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536741725; cv=none; d=google.com; s=arc-20160816; b=TUV18lSVfgw61m2gAMvKotAgB6jTicJKWBdcyfoYSHOWfGb4pBJ4SozyKR+vfjD1y9 6vFugpaO9UqS0V3AV0johr/EofR+n9ZuybbL+OkX1ehIbcm17zyQ6VdkOrh4wqHNArq7 4ZRIOwsT1iDz/VIQ17mEt/7QPJOPcYGVhCmRdWf8Z7qmB6AiCDRfQSoRG78MAo8/OlMF E1Fq9jewdxWJfjCl2EtVbDL2dsucRqkIuroxjz/pdoIJwSFxlG+10JAC76tLJ+C19Oex iLGIl0E+SeuCvklynvjTfGEV51KZXWbICB6MJkLirs4OnS+b6Q7RvyvV75OffYM4OcG6 Ltfw== 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:from:references:cc:to:subject:dkim-signature; bh=C/0tqtyKIui3gTmlZeuRN7hzV31E1/YS3e/kooZohyc=; b=lj1gNK54iJKeG6cRgVLxEw/ctjwUSwsFLXD8cCCP/I+sFmVraY5OBklvKkv2aLHm7w ma8ueqxzex7AtD1mlBTpqfmeAJ+JkCfG5JBSESc4jy2LwlwBe2fiySphak09IzEHOxv5 L1v4tuUF5VimPYp9H6hpyJAozma6nt9YnVI5HzE8rH32QkDfm5s/L2DA7CaUQaqLAu2B NSUdBhhX04+2oV/2oGahuhWUtSj2nl90eK8aa5FDIdzyacD2QnMqMWuw++9cDEHjRNcz TnPffFTZspi6qDBk65A6H1FVxUTE/Gh43FFnL5psqhtvUHRX9zbSMkBlvatCzaqE1saO O27g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ursulin-net.20150623.gappssmtp.com header.s=20150623 header.b=JerLaMZW; 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 b5-v6si432473pgl.308.2018.09.12.01.41.50; Wed, 12 Sep 2018 01:42:05 -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; dkim=pass header.i=@ursulin-net.20150623.gappssmtp.com header.s=20150623 header.b=JerLaMZW; 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 S1727391AbeILNpO (ORCPT + 99 others); Wed, 12 Sep 2018 09:45:14 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:41262 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbeILNpO (ORCPT ); Wed, 12 Sep 2018 09:45:14 -0400 Received: by mail-wr1-f68.google.com with SMTP id z96-v6so1078493wrb.8 for ; Wed, 12 Sep 2018 01:41:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=C/0tqtyKIui3gTmlZeuRN7hzV31E1/YS3e/kooZohyc=; b=JerLaMZWvrU2U/Q5x3DSsZUj1rnC2ilkNEuSFaTlWa5rM8Vs3onW5Cp+nxdPrnLZGZ IWcNFBILN/B/Kkdje+Rod6dJ5H2B4rrEb2XJ+jSQ0UgDKKfcQM+X4dkmdS19Fm3/80+R O0NUCP7N5g7pQUH2d/0slJMjz9aje47P7DqH/V5aEqCZ+8Kcotpxh4BbL8KkvJfZ4DI3 vCcudbGeANgjBne3A/YrX1SaAl7AALapEDYzmV03tM+N5vJ+5TwNPLzRCFlyZL8/0oRl +5/BMJbOw5ohCCQmHst2lsmfAOgYnvKm+FIvTxeNzXaA2aB8+9yzr/B28IAHsTUumvRX gj+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=C/0tqtyKIui3gTmlZeuRN7hzV31E1/YS3e/kooZohyc=; b=rVKOpqbyQZXuImh0vwUa08a4qJtKPxovLHYWb0L1myPJr7n+/CxxgEYW6AfpVab1Ac s305CTXyWkVwRQn5XzOMv2tUvMqM6kZ5PXsTgj9lfKW+osb6f0bYIHYNrN/VOAMcHXMA 6xpSEbkktspQ4tB9N0ySTmyVDGrHUwY/UZVYt9GgyzYiEXGg7uoKzQl7VbIO5/8lp9P9 wLHZVKGgsFHLskxKtz+4eYrQxkFaRqIqruTaKl6JtIiPCTyeR0ZERDciP3Pfe7wkw20c s/psx+tZzPsPEnu66hjDxz4ZGA72lLed20iTGe3Yc8wtoaawi4Xtn8h1b4QyqhxZroFQ /k3g== X-Gm-Message-State: APzg51ALzL88xkuZXMuXoYXJq2kFIFjcmZFSNVnWazqBr1coEqNiPhB4 ua++mmU+eyF0+/t8+zDE8KdAKg== X-Received: by 2002:a5d:4089:: with SMTP id o9-v6mr659113wrp.133.1536741702471; Wed, 12 Sep 2018 01:41:42 -0700 (PDT) Received: from [192.168.0.197] ([95.144.165.37]) by smtp.googlemail.com with ESMTPSA id h10-v6sm644903wmf.44.2018.09.12.01.41.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 01:41:41 -0700 (PDT) Subject: Re: [RFC 0/4] perf: Per PMU access controls (paranoid setting) To: Alexey Budankov , 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> <27559444-ca88-2c04-c85c-613116e9e51f@linux.intel.com> From: Tvrtko Ursulin Message-ID: <3361d8e1-50a0-2404-78cb-b83ca345b565@ursulin.net> Date: Wed, 12 Sep 2018 09:41:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <27559444-ca88-2c04-c85c-613116e9e51f@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed 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 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. 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(-) >> >