From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH v2 0/7] Allow disabling HW_BREAKPOINTS, PERF_EVENTS, INSTRUCTION_DECODER, IRQ_WORK, ANON_INODES Date: Tue, 11 Mar 2014 11:29:10 +0100 Message-ID: <20140311102910.GA10688@gmail.com> References: <20140310074354.GA4890@gmail.com> <20140310084221.GA6712@leaf> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Suravee Suthikulpanit , Frederic Weisbecker , David Herrmann , Stephane Eranian , linux-kernel@vger.kernel.org, Paul Gortmaker , Paul Mackerras , "H. Peter Anvin" , Thomas Gleixner , Andi Kleen , x86@kernel.org, Ingo Molnar , oprofile-list@lists.sf.net, Mel Gorman , Arnaldo Carvalho de Melo , Borislav Petkov , Dave Young , Peter Zijlstra , Gleb Natapov , Steven Rostedt , Bin Gao , Matt Fleming , Jacob Shin , Oleg Nesterov , T To: Josh Triplett Return-path: Content-Disposition: inline In-Reply-To: <20140310084221.GA6712@leaf> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: oprofile-list-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org * Josh Triplett wrote: > On Mon, Mar 10, 2014 at 08:43:54AM +0100, Ingo Molnar wrote: > > > > * Josh Triplett wrote: > > > > > This patch series makes it possible to disable HW_BREAKPOINTS, > > > PERF_EVENTS, INSTRUCTION_DECODER, IRQ_WORK, and ANON_INODES. > > > Without this patch series, all of these config options get > > > automatically selected on x86, making them impossible to > > > disable. > > > > > > This is a revival of a previous patch series from Andi Kleen > > > sent in October 2013. [...] > > > > So my main problem with those patches was that if HW_BREAKPOINTS > > is disabled then GDB 'hbreak' isn't simply disabled but fails in > > various non-obvious ways, taking down the rest of GDB with it, so > > it's in essence an ABI and tool breaker which is not very useful. > > It's hidden behind EXPERT for a reason, [...] With many distros enabling CONFIG_EXPERT=y that's a distinction without much meaning. > [...] and non-hardware breakpoints still work just fine. [...] A lot of other stuff will work just fine as well. Yet my point was that 'hbreak' breaks in ugly ways. > [...] This is the kind of thing enabled on an embedded system, where > you're not going to be running GDB at all, let alone using "hbreak". So that is why I suggested making ptrace configurable. Perhaps. > Given that other options depending on EXPERT let you disable things > as critical as futexes or ELF binary support... Both of which will break in pretty clear ways. The granularity of how we can disable ABIs largely depends on how well actual user-space code handles the failures, and what I'm saying here is that the disabling of hardware breakpoints is too finegrained. Disabling ptrace for embedded OTOH makes sense and gives us even more savings and security advantage. Thanks, Ingo ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech