From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11727 invoked by alias); 6 Dec 2005 05:27:32 -0000 Received: (qmail 11721 invoked by uid 22791); 6 Dec 2005 05:27:31 -0000 X-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_40,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mail4.hitachi.co.jp (HELO mail4.hitachi.co.jp) (133.145.228.5) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 06 Dec 2005 05:27:29 +0000 Received: from mc2.mcg.hitachi.co.jp (unknown [133.144.237.46]) by mail4.hitachi.co.jp (Postfix) with ESMTP id AEF5233CD7 for ; Tue, 6 Dec 2005 14:27:26 +0900 (JST) Received: (from root@localhost) by mc2.mcg.hitachi.co.jp (8.11.6+Sun/8.11.6) id jB65RQB12483 for systemtap@sources.redhat.com; Tue, 6 Dec 2005 14:27:26 +0900 (JST) Received: from unknown [192.168.2.1] by mc2.mcg.hitachi.co.jp with SMTP id QAA12480; Tue, 6 Dec 2005 14:27:26 +0900 Received: from mfilter-s5.hitachi.co.jp by mlsv5.hitachi.co.jp (8.12.10/8.12.10) id jB65RPaG018485; Tue, 6 Dec 2005 14:27:25 +0900 Received: from vshuts4.hitachi.co.jp (unverified) by mfilter-s5.hitachi.co.jp (Content Technologies SMTPRS 4.3.17) with SMTP id ; Tue, 6 Dec 2005 14:27:25 +0900 Received: from hsdlgw92.sdl.hitachi.co.jp ([133.144.7.20]) by vshuts4.hitachi.co.jp with SMTP id M2005120614272516077 ; Tue, 06 Dec 2005 14:27:25 +0900 Received: from vgate2.sdl.hitachi.co.jp by hsdlgw92.sdl.hitachi.co.jp (8.9.3/3.7W01100113) id OAA12646; Tue, 6 Dec 2005 14:27:25 +0900 Received: from maila.sdl.hitachi.co.jp ([133.144.14.196]) by vgate2.sdl.hitachi.co.jp (SAVSMTP 3.1.1.32) with SMTP id M2005120614272411606 ; Tue, 06 Dec 2005 14:27:24 +0900 Received: from [192.168.16.226] ([192.168.16.226]) by maila.sdl.hitachi.co.jp (8.13.1/3.7W04031011) with ESMTP id jB65ROa6002854; Tue, 6 Dec 2005 14:27:24 +0900 Message-ID: <4395213B.90908@sdl.hitachi.co.jp> Date: Tue, 06 Dec 2005 05:27:00 -0000 From: Masami Hiramatsu User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: ja, en-us, en MIME-Version: 1.0 To: systemtap@sources.redhat.com Cc: Masami Hiramatsu , Yumiko Sugita , Satoshi Oshima , Hideo Aoki , "Keshavamurthy, Anil S" , ananth@in.ibm.com Subject: Re: [RFC][Patch 2/2][take2]kprobe: kprobe-booster against 2.6.14-mm1 for i386 References: <43870DDB.8020306@sdl.hitachi.co.jp> <438B142B.5080407@sdl.hitachi.co.jp> <438B148F.9000004@sdl.hitachi.co.jp> <438B14E1.3010301@sdl.hitachi.co.jp> In-Reply-To: <438B14E1.3010301@sdl.hitachi.co.jp> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2005-q4/txt/msg00347.txt.bz2 Hi, I forgot to enable preemption in previous booster patch. With this fix, the booster can work safely on the preemptible kernel. For safety, the booster is enabled only if the pre-handler of kprobe is called from where the preemption is prohibited. Masami Hiramatsu wrote: > @@ -235,6 +283,14 @@ static int __kprobes kprobe_handler(stru > /* handler has already set things up, so skip ss setup */ > return 1; > > + if (p->ainsn.boostable == 1 && #ifdef CONFIG_PREEMPT preempt_count() != 1 && #endif > + !p->post_handler && !p->break_handler ) { > + /* Boost up -- we can execute copied instructions directly */ > + reset_current_kprobe(); > + regs->eip = (unsigned long)&p->ainsn.insn; preempt_enable_no_resched(); > + return 1; > + } > + > ss_probe: > prepare_singlestep(p, regs); > kcb->kprobe_status = KPROBE_HIT_SS; -- Masami HIRAMATSU 2nd Research Dept. Hitachi, Ltd., Systems Development Laboratory E-mail: hiramatu@sdl.hitachi.co.jp