From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941470AbcJSOTl (ORCPT ); Wed, 19 Oct 2016 10:19:41 -0400 Received: from merlin.infradead.org ([205.233.59.134]:34748 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941375AbcJSOTa (ORCPT ); Wed, 19 Oct 2016 10:19:30 -0400 Date: Wed, 19 Oct 2016 12:01:26 +0200 From: Peter Zijlstra To: Daniel Micay Cc: kernel-hardening@lists.openwall.com, Mark Rutland , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , "linux-doc@vger.kernel.org" , LKML , Jeff Vander Stoep Subject: Re: [kernel-hardening] [PATCH 1/2] security, perf: allow further restriction of perf_event_open Message-ID: <20161019100126.GI3102@twins.programming.kicks-ass.net> References: <1469630746-32279-1-git-send-email-jeffv@google.com> <20161017134413.GK29095@leverpostej> <1476825301.4032.7.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1476825301.4032.7.camel@gmail.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 18, 2016 at 05:15:01PM -0400, Daniel Micay wrote: > It's also worth noting that fine-grained control via a scoped mechanism > would likely only be used to implement *more restrictions* on Android, > not to make the feature less aggressive. > It's desirable for perf events to be disabled by default for non-root > across the board on Android. Right, but this is Android. The knob seems to now also live in Debian (and derived) distros. And there it is utter crap. It completely defeats having perf for a fairly large segment of corporate developers who do not get to have root on their own machines (which is stupid policy but whatever). It similarly defeats development of self profiling JITs and whatnot. A capability would allow people to run perf (or another sanctioned binary), even though in general they cannot do sys_perf_event_open().