From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Triplett Subject: Re: [PATCH v2 0/7] Allow disabling HW_BREAKPOINTS, PERF_EVENTS, INSTRUCTION_DECODER, IRQ_WORK, ANON_INODES Date: Mon, 10 Mar 2014 01:42:21 -0700 Message-ID: <20140310084221.GA6712@leaf> References: <20140310074354.GA4890@gmail.com> 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: Ingo Molnar Return-path: Content-Disposition: inline In-Reply-To: <20140310074354.GA4890@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: oprofile-list-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org 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, and non-hardware breakpoints still work just fine. 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". Given that other options depending on EXPERT let you disable things as critical as futexes or ELF binary support... Would it help to have some more detailed help text for HW_BREAKPOINTS, explaining that gdb's "hbreak" and similar will utterly fail if this option is disabled? Alternatively, would it suffice to make ptrace_set_debugreg always return an error when !CONFIG_HW_BREAKPOINTS? Would that produce error behavior you'd prefer? > If all of ptrace is disabled then it perhaps behaves more cleanly, That's on my list for the future. :) - Josh Triplett ------------------------------------------------------------------------------ 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