Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754819AbbLKKfW (ORCPT ); Fri, 11 Dec 2015 05:35:22 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:42303 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752612AbbLKKfU (ORCPT ); Fri, 11 Dec 2015 05:35:20 -0500 Date: Fri, 11 Dec 2015 10:34:59 +0000 From: Russell King - ARM Linux To: "Jon Medhurst (Tixy)" Cc: David Long , Pratyush Anand , Steve Capper , Ananth N Mavinakayanahalli , will.deacon@arm.com, "linux-kernel@vger.kernel.org" , anil.s.keshavamurthy@intel.com, Sandeepa Prabhu , masami.hiramatsu.pt@hitachi.com, wcohen@redhat.com, davem@davemloft.net, "linux-arm-kernel@lists.infradead.org" Subject: Re: [RFC] kprobe'ing conditionally executed instructions Message-ID: <20151211103459.GS8644@n2100.arm.linux.org.uk> References: <566A5997.9020908@linaro.org> <1449829633.2815.27.camel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1449829633.2815.27.camel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1559 Lines: 30 On Fri, Dec 11, 2015 at 10:27:13AM +0000, Jon Medhurst (Tixy) wrote: > On Fri, 2015-12-11 at 00:05 -0500, David Long wrote: > > There is a moderate amount of code already in kprobes on ARM and the > > current ARMv8 patch to deal with conditional execution of instructions. > > One aspect of how this is handled is that instructions that fail their > > predicate and are not (technically) executed are also not treated as a > > hit kprobe. Steve Capper has suggested that the probe handling should > > still take place because we stepped through the instruction even if it > > was effectively a nop. This would be a significant change in how it > > currently works on 32-bit ARM > > 32-bit ARM uses undefined instructions for kprobe 'breakpoints' and the > ARM ARM says it's implementation defined behaviour whether these > generate exceptions or not, i.e. whether the kprobe handler will be > called. There are two classes of undefined instructions. There are those which fall into the above category, and there are those which are guaranteed to raise an exception. We should always be using the guaranteed ones, not the other set. -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/