From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31900 invoked by alias); 14 Mar 2010 02:05:40 -0000 Received: (qmail 31816 invoked by uid 22791); 14 Mar 2010 02:05:38 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 14 Mar 2010 02:05:34 +0000 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2E25WNa014628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 13 Mar 2010 21:05:32 -0500 Received: from [10.3.234.226] (vpn-234-226.phx2.redhat.com [10.3.234.226]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2E25UKg022961; Sat, 13 Mar 2010 21:05:31 -0500 Message-ID: <4B9C446A.9020208@redhat.com> Date: Sun, 14 Mar 2010 02:05:00 -0000 From: Masami Hiramatsu User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc11 Thunderbird/3.0.3 MIME-Version: 1.0 To: OGAWA Hirofumi CC: Ingo Molnar , lkml , systemtap , DLE , Dieter Ries , Ananth N Mavinakayanahalli Subject: Re: [PATCH -tip 1/3] kprobes: Hide CONFIG_OPTPROBES and set if arch support optimized kprobes References: <20100312232208.2017.55337.stgit@localhost6.localdomain6> <87k4tfyd08.fsf@devron.myhome.or.jp> In-Reply-To: <87k4tfyd08.fsf@devron.myhome.or.jp> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2010-q1/txt/msg00659.txt.bz2 OGAWA Hirofumi wrote: > Masami Hiramatsu writes: > >> Hide CONFIG_OPTPROBES and set if arch support optimized kprobes, since >> this option doesn't change the behavior of kprobes, but just reduces >> the overhead. > > I don't so care whether this is configurable or not, but this confuses > me now. The following seems to say it's changed, but now this comment > says it wasn't changed. The following docs was obsoleted? > > Thanks. > > NOTE for geeks: > The jump optimization changes the kprobe's pre_handler behavior. > Without optimization, the pre_handler can change the kernel's execution > path by changing regs->ip and returning 1. However, when the probe > is optimized, that modification is ignored. Thus, if you want to > tweak the kernel's execution path, you need to suppress optimization, > using one of the following techniques: Ah, good point. This is only one point of changing the behavior. So if someone makes an out of tree module for changing the ip address by using kprobes, e.g. live code patching or something like that, it will be affected by this change. However, I think using kprobes for this way is not obviously documented, moreover, some workarounds for that are documented as above. So I don't worried about it. Anyway, indeed, the patch comment is wrong. I need to say "this option doesn't change the major behavior of kprobes, and workarounds for minor change are documented." :) Thank you for pointing it out! -- Masami Hiramatsu e-mail: mhiramat@redhat.com