Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757387Ab2EBUka (ORCPT ); Wed, 2 May 2012 16:40:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3987 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756407Ab2EBUk3 (ORCPT ); Wed, 2 May 2012 16:40:29 -0400 To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Frederic Weisbecker , Masami Hiramatsu , "H. Peter Anvin" , fche@redhat.com Subject: Re: [PATCH 6/9][RFC] kprobes: Allow probe on ftrace reserved text (but move it) References: <20120502192418.024103772@goodmis.org> <20120502193237.321234712@goodmis.org> From: fche@redhat.com (Frank Ch. Eigler) Date: Wed, 02 May 2012 16:40:15 -0400 In-Reply-To: <20120502193237.321234712@goodmis.org> (Steven Rostedt's message of "Wed, 02 May 2012 15:24:24 -0400") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 831 Lines: 21 rostedt wrote: > [...] Added KPROBE_FLAG_MOVED (as suggested by Masami) that is set > when the address is moved to get around an ftrace nop. [...] Steve, perhaps my earlier comments on this got lost during the mailing list outage. The gist is that a KPROBE_FLAG_MOVED being set this way accomplishes very little since nothing is looking for that flag. Instead, you should patch {arch/*}/kernel/kprobe.c kprobe_handler() to subtract MCOUNT_INSN_SIZE back out from pt_regs->ip if KPROBE_FLAG_MOVED was set. That way, kprobes clients need do not perceive the int3 movement. - FChE -- 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/