Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1852235imm; Tue, 22 May 2018 10:20:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpUPyaSl6BjznwykqPEgpDrgCXM6d50+4TGl9mYT42SD3ZkxDVS98gvzzBJNiPa0eeg7z27 X-Received: by 2002:a62:c050:: with SMTP id x77-v6mr25091134pff.67.1527009600393; Tue, 22 May 2018 10:20:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527009600; cv=none; d=google.com; s=arc-20160816; b=NY0CCPRbo8XKlMo1jTSmyt0vGIIEKsu/iK6kOZYhSueEL8o9U3INkFBHWocSi9D6rw rth5DCXzU00ykd6RhKaEW2gOMc25R9YwjRN6ruDFv3h7a+sEoqgzUEyDuZsxVvP5KyHb WYp//E1mpOfPmIycXIclFwJS1x9CHnCUQnOunHKEz/IKWUa26qaIeGfozauVDzQoPAQS MH60XrGMJ/uVO8oIu2T/p28ZkYQSOO3oMM0xT0f04SN1TVkHexCfdpPQbF4Vo3RZfstc 9mM4tlZOm8FNqXUQpbeC0asYPMxPGoLUJIjTRywOvHx82BbigmkIECs8uIbCjxEWcM0j Ubog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=NEJL4WWVZ3faER3LqOYs3sduwLU97K7nTrH70jca+8U=; b=mRRWLxRDkBCGQud0ijEIh0xoHe1Sr1VRBeicUZEBZT2Ox1/lMg8JwZzN9AZ2VJNYwn KYuHb8s2tuulimnnH8PHd27+k4BzZi+gC/fU9gL9+sx/9zvRYIXAzbc4ZHG1nwqYRpBv eBifqYo+j+A6lEe+FIbErroqfxlp3ZrE7zgmUJfjGcpUNIPEhdDcWS81SKwTnCBdoBjd tG/iGr0+tV6Ojphf2i31+Aq+Yj81KectBf8SsAtozak6vupuZV4Fce1beuywverxfgw3 N0vNooSnbuF19SqVmfsrDZdl3vvldquvMv/LODPunNzbu6/PB8b36UNrH3/Fhz6Qx6/J rj/g== 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 j123-v6si13000102pgc.584.2018.05.22.10.19.45; Tue, 22 May 2018 10:20:00 -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 S1751567AbeEVRT2 (ORCPT + 99 others); Tue, 22 May 2018 13:19:28 -0400 Received: from mga01.intel.com ([192.55.52.88]:32863 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751268AbeEVRT1 (ORCPT ); Tue, 22 May 2018 13:19:27 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2018 10:19:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,430,1520924400"; d="scan'208";a="201535354" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.126]) by orsmga004.jf.intel.com with ESMTP; 22 May 2018 10:19:26 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id F3CFA300FB5; Tue, 22 May 2018 10:19:25 -0700 (PDT) Date: Tue, 22 May 2018 10:19:25 -0700 From: Andi Kleen To: Alexey Budankov Cc: Peter Zijlstra , Tvrtko Ursulin , linux-kernel@vger.kernel.org, Tvrtko Ursulin , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Mark Rutland , Tvrtko Ursulin Subject: Re: [RFC] perf: Allow fine-grained PMU access control Message-ID: <20180522171925.GL4486@tassilo.jf.intel.com> References: <20180521092549.5349-1-tvrtko.ursulin@linux.intel.com> <20180522090527.GP12198@hirez.programming.kicks-ass.net> <017c4a20-b597-9c0e-4cf3-c0fd1d7bf3d7@ursulin.net> <20180522123213.GR12198@hirez.programming.kicks-ass.net> <88a005e3-e090-33c1-0107-5c04a4d8f97f@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88a005e3-e090-33c1-0107-5c04a4d8f97f@linux.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > IMHO, it is unsafe for CBOX pmu but could IMC, UPI pmus be an exception here? > Because currently perf stat -I from IMC, UPI counters is only allowed when > system wide monitoring is permitted and this prevents joint perf record and > perf stat -I in cluster environments where users usually lack ability to > modify paranoid. Adding Andi who may have more ideas regarding all that. PMU isolation is about not making side channels worse. There are normally already side channels from timing, but it has a degree of noise. PMU isolation is just to prevent opening side channels with less noise. But reducing noise is always a trade off, it can never be perfect and at some point there are dimishing returns. In general the farther you are from the origin of the noise there is already more noise. The PMU can reduce the noise, but if it's far enough away it may not make much difference. So there are always trade offs with shades of grey, not a black and white situation. Depending on your security requirements it may be totally reasonable e.g. to allow the PMU on the memory controller (which is already very noisy in any case), but not on the caches. Or allow it only on the graphics which is already fairly isolated. So per pmu paranoid settings are a useful concept. -Andi