From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7584 invoked by alias); 24 Nov 2009 07:53:40 -0000 Received: (qmail 7568 invoked by uid 22791); 24 Nov 2009 07:53:40 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.mail.elte.hu (HELO mx2.mail.elte.hu) (157.181.151.9) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Nov 2009 07:53:33 +0000 Received: from elvis.elte.hu ([157.181.1.14]) by mx2.mail.elte.hu with esmtp (Exim) id 1NCqCj-0003JF-Ap from ; Tue, 24 Nov 2009 08:52:58 +0100 Received: by elvis.elte.hu (Postfix, from userid 1004) id 2E04A3E22F6; Tue, 24 Nov 2009 08:52:50 +0100 (CET) Date: Tue, 24 Nov 2009 07:53:00 -0000 From: Ingo Molnar To: Frederic Weisbecker Cc: Masami Hiramatsu , Ananth N Mavinakayanahalli , lkml , "H. Peter Anvin" , Jim Keniston , Srikar Dronamraju , Christoph Hellwig , Steven Rostedt , Anders Kaseorg , Tim Abbott , Andi Kleen , Jason Baron , Mathieu Desnoyers , systemtap , DLE Subject: Re: [PATCH -tip v5 00/10] kprobes: Kprobes jump optimization support Message-ID: <20091124075249.GC21991@elte.hu> References: <20091123232115.22071.71558.stgit@dhcp-100-2-132.bos.redhat.com> <20091124020315.GA6221@nowhere> <20091124032008.GD6752@nowhere> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091124032008.GD6752@nowhere> User-Agent: Mutt/1.5.20 (2009-08-17) Received-SPF: neutral (mx2.mail.elte.hu: 157.181.1.14 is neither permitted nor denied by domain of elte.hu) client-ip=157.181.1.14; envelope-from=mingo@elte.hu; helo=elvis.elte.hu; X-ELTE-SpamScore: 0.0 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=0.0 required=5.9 tests=none autolearn=no SpamAssassin version=3.2.5 _SUMMARY_ X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00658.txt.bz2 * Frederic Weisbecker wrote: > On Tue, Nov 24, 2009 at 03:03:19AM +0100, Frederic Weisbecker wrote: > > On Mon, Nov 23, 2009 at 06:21:16PM -0500, Masami Hiramatsu wrote: > > > When the optimized-kprobe is hit before optimization, its handler > > > changes IP(instruction pointer) to copied code and exits. So, the > > > instructions which were copied to detour buffer are executed on the detour > > > buffer. > > > > > > > > Hm, why is it playing such hybrid game there? > > If I understand well, we have executed int 3, executed the > > handler and we jump back to the detour buffer? > > > > I got it, I think. We have instructions to patch. And the above turn > this area into dead code, safe to patch. > > But still, stop_machine() seem to make it not necessary anymore. i think 'sending an IPI to all online CPUs' might be an adequate sequence to make sure patching effects have propagated. I.e. an smp_call_function() with a dummy function? Ingo