Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp499147imm; Fri, 28 Sep 2018 02:00:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV60LAe97EEWwd3xODkxq/ImDo8AyoBWeq5pn1PoQt+COb2q39sgLrHHTxc+NDQGXxAfnLsV4 X-Received: by 2002:a62:1b45:: with SMTP id b66-v6mr11202406pfb.94.1538125218021; Fri, 28 Sep 2018 02:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538125217; cv=none; d=google.com; s=arc-20160816; b=Dkc8sE0QpE7FBwseoCcXXyxkH7buNNGM6SggIHPdbipqF6LmMDP6b/FAkaCSGjkv3V lI00buMap+12koWUznytUstouH8XlFS/WKHYEFuVc5Uje8i4t2FOWH7AU8lorLlTCFSy Ms/HVSvE1E6HO3WFoGfu37cVn4ghZR+3yc3KJe8CjRxZpxYki2WQuoSeutOhpDbz9o1l 0i7TQ3gFkbIcMu+TprLaiPDKJhkDXWMj3UoPr5MHAFwvblND4yvzvzAEozfU2Ok8sP9C IIrj8mX9I9eTvEpTZ4vIYGlsg0ctCbIv0C2E0AJr09zfsdXa2Gh18Jl+Mu7hPK7jAWV0 RRpw== 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; bh=HO3tN73CqbplVgE3jh7e3rliybYmD56DJ9ASdvV/fZc=; b=SOC8acq84VbMeVmm5adrsc8UeDZY+cU81A6j+kkadwp30HpVtVGoiDTjHI6fuOF3uB zV4D5CCqmjaMIQmkAgfsh5/Azk3Num+8ILSSWUqm2gxxA0XPD0uXDJB+Hw1THHCKxBqS GmUku+ystAhl+02aEEhb+qYA+hZQ3JNNu4l+wgQ0T/WHQBSI14n8b83RUOI9tp3ELe7o yctz1IdIV2aYPzhTBc6qE7GYEun29fS5lLJfHk5gotwGHeu39HPJFiD4XztksufBsjAX wXHVV5GdWTbVhw7X295JPseNuPLVJrNxe0RJWdIOB5gJwp5HL0KZLMUVUYeTKbpwwcp1 tiBg== 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 r205-v6si4168278pgr.634.2018.09.28.02.00.01; Fri, 28 Sep 2018 02:00:17 -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 S1729261AbeI1PUk (ORCPT + 99 others); Fri, 28 Sep 2018 11:20:40 -0400 Received: from mga11.intel.com ([192.55.52.93]:28612 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728887AbeI1PUk (ORCPT ); Fri, 28 Sep 2018 11:20:40 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Sep 2018 01:57:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,314,1534834800"; d="scan'208";a="266712420" Received: from tursulin-mobl.ger.corp.intel.com (HELO [10.252.0.58]) ([10.252.0.58]) by fmsmga005.fm.intel.com with ESMTP; 28 Sep 2018 01:57:39 -0700 Subject: Re: [RFC 3/5] perf: Allow per PMU access control To: Andi Kleen , Tvrtko Ursulin Cc: linux-kernel@vger.kernel.org, Tvrtko Ursulin , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , "H. Peter Anvin" , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Madhavan Srinivasan , Alexey Budankov , x86@kernel.org References: <20180919122751.12439-1-tvrtko.ursulin@linux.intel.com> <20180919122751.12439-4-tvrtko.ursulin@linux.intel.com> <20180927201559.GH28040@tassilo.jf.intel.com> From: Tvrtko Ursulin Message-ID: <38a45f2b-b47a-fccd-2c87-3a46502202a4@linux.intel.com> Date: Fri, 28 Sep 2018 09:57:37 +0100 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: <20180927201559.GH28040@tassilo.jf.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/09/2018 21:15, Andi Kleen wrote: >> + mutex_lock(&pmus_lock); >> + list_for_each_entry(pmu, &pmus, entry) >> + pmu->perf_event_paranoid = sysctl_perf_event_paranoid; >> + mutex_unlock(&pmus_lock); > > What happens to pmus that got added later? There is a hunk a bit lower in the patch where in perf_pmu_register the initial setting is assigned from the global sysctl. > The rest looks good. > > Can you post a non RFC version? Sure! Regards, Tvrtko