From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32596 invoked by alias); 24 Nov 2009 03:20:19 -0000 Received: (qmail 32587 invoked by uid 22791); 24 Nov 2009 03:20:19 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f213.google.com (HELO mail-ew0-f213.google.com) (209.85.219.213) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 Nov 2009 03:20:15 +0000 Received: by ewy5 with SMTP id 5so3030252ewy.10 for ; Mon, 23 Nov 2009 19:20:12 -0800 (PST) Received: by 10.213.1.5 with SMTP id 5mr4546167ebd.21.1259032812490; Mon, 23 Nov 2009 19:20:12 -0800 (PST) Received: from nowhere (ADijon-552-1-123-3.w92-148.abo.wanadoo.fr [92.148.186.3]) by mx.google.com with ESMTPS id 28sm1953820eyg.36.2009.11.23.19.20.10 (version=SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 19:20:11 -0800 (PST) Received: by nowhere (nbSMTP-1.00) for uid 1000 (using TLSv1/SSLv3 with cipher RC4-MD5 (128/128 bits)) fweisbec@gmail.com; Tue, 24 Nov 2009 04:20:12 +0100 (CET) Date: Tue, 24 Nov 2009 03:20:00 -0000 From: Frederic Weisbecker To: Masami Hiramatsu Cc: Ingo Molnar , 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: <20091124032008.GD6752@nowhere> References: <20091123232115.22071.71558.stgit@dhcp-100-2-132.bos.redhat.com> <20091124020315.GA6221@nowhere> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091124020315.GA6221@nowhere> User-Agent: Mutt/1.5.18 (2008-05-17) 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/msg00655.txt.bz2 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.