Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp756762imm; Fri, 28 Sep 2018 06:23:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV62uszghTjW8SsmJGCfyrxzIF3wzdruELpsu9Xt1dzYDqNLN9ycOV1qpnPxtnkndZrJvYJ12 X-Received: by 2002:a62:4255:: with SMTP id p82-v6mr16837242pfa.238.1538141009181; Fri, 28 Sep 2018 06:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538141009; cv=none; d=google.com; s=arc-20160816; b=eBLMoo3EoqttNYgy4XgHx2wCSV+M+lUxO75lwvHjxv+YAkxJj7ihGdudndPqfDMpWZ YOp6iMunFOBzgwkv9zBVWe53x01S2wURtf1XvQMrUMcU7UrhASpZsxHrdWGrtYQRredi HwG6RK9sr4C6T3Hyvwi6rYNJONxL8IdXJV4cr+MBq2WY85/j5IqaVrNGNbUwWQGqBPXF 5XSZunXVdi/H2G23EYaQ2H1TGCu+tpEla4r11GVc7aruZo2xseC7/rKZtKVeiBpwLmMT pQu8v5EI3a289g/fwrIiPz0pV9DzwmSy5FX26wcsaJjNWfcIvL1MqPkn839qsueQVf0g ++yA== 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=WVvSMKUAIV+yRjEs0dspvrI45P7k/0r96fhGUFzDCVM=; b=AaPiovjji1JmoTvaqNxu8JDw8DT4sqUtQOuu/SXs5UREXJOvOKa3FmXNRTq+C+C11T y9BZ/OIN3JCvdoPOpwqHEsZCZP+PQkxjysRGoG9SnwabqgctmD/OxJoX3S94GGgSi3Z6 BpM0uphhaAKtnDGjFcO2SpK7r4JdOMmnBWOL4EjMnzh6LLBPJcXkAuzl6HA50HkSo+Id /mW+FwXoRswhsFup5A+K8ZmFyFcLRmEfLl0i6M8ELVR0fYZWjiqgc09+4ybUwszs/0QJ U1no/w8XXmTJ/GNYMJdPRo3w38/47QkNchlFz0Z9ddxR1tvcLTnKEh7sxu+UuG8vHBhY Hl2Q== 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 u129-v6si4927817pfb.247.2018.09.28.06.23.12; Fri, 28 Sep 2018 06:23:29 -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 S1728990AbeI1Tp6 (ORCPT + 99 others); Fri, 28 Sep 2018 15:45:58 -0400 Received: from mga12.intel.com ([192.55.52.136]:25931 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726349AbeI1Tp6 (ORCPT ); Fri, 28 Sep 2018 15:45:58 -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 fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Sep 2018 06:22:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,315,1534834800"; d="scan'208";a="266762049" 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 06:22:08 -0700 Subject: Re: [RFC 0/5] perf: Per PMU access controls (paranoid setting) To: Thomas Gleixner , Tvrtko Ursulin Cc: LKML , Peter Zijlstra , x86@kernel.org, "H. Peter Anvin" , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Madhavan Srinivasan , Andi Kleen , Alexey Budankov , Kees Cook , Jann Horn References: <20180919122751.12439-1-tvrtko.ursulin@linux.intel.com> From: Tvrtko Ursulin Message-ID: Date: Fri, 28 Sep 2018 14:22:07 +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: 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 Hi, On 28/09/2018 11:26, Thomas Gleixner wrote: > Tvrtko, > > On Wed, 19 Sep 2018, Tvrtko Ursulin wrote: > > It would be very helpful if you cc all involved people on the cover letter > instead of just cc'ing your own pile of email addresses. CC'ed now. I accept it was by bad to miss adding Cc's on the cover letter, but my own email addresses hopefully should not bother you. It is simply a question of what I have in .gitconfig vs what I forgot to do manually. >> 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 > > This is really not helpful. The cover letter and the change logs should > contain a summary of that discussion and a proper justification of the > proposed change. Just saying 'sysadmins might want to allow' is not useful > at all, it's yet another 'I want a pony' thing. Okay, for the next round I will expand the cover letter with at least one concrete example on how it is usable and summarize the discussion a bit. > I read through the previous thread and there was a clear request to involve > security people into this. Especially those who are deeply involved with > hardware side channels. I don't see anyone Cc'ed on the whole series. Who would you recommend I add? Because I really don't know.. > For the record, I'm not buying the handwavy 'more noise' argument at > all. It wants a proper analysis and we need to come up with criteria which > PMUs can be exposed at all. > > All of this want's a proper documentation clearly explaining the risks and > scope of these knobs per PMU. Just throwing magic knobs at sysadmins and > then saying 'its their problem to figure it out' is not acceptable. Presumably you see adding fine grained control as diminishing the overall security rather than raising it? Could you explain why? Because incompetent sysadmin will turn it off for some PMU, while without having the fine-grained control they wouldn't turn it off globally? This feature was requested by the exact opposite concern, that in order to access the i915 PMU, one has to compromise the security of the entire system by allowing access to *all* PMU's. Making this ability fine-grained sounds like a logical solution for solving this weakening of security controls. Concrete example was that on video transcoding farms users want to monitor the utilization of GPU engines (like CPU cores) and they can do that via the i915 PMU. But for that to work today they have to dial down the global perf_event_paranoid setting. Obvious improvement was to allow them to only dial down the i915.perf_event_paranoid setting. As such, for this specific use case at least, the security is increased. Regards, Tvrtko