From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2093 invoked by alias); 13 Dec 2013 06:06:14 -0000 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 Received: (qmail 2082 invoked by uid 89); 13 Dec 2013 06:06:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail7.hitachi.co.jp Received: from mail7.hitachi.co.jp (HELO mail7.hitachi.co.jp) (133.145.228.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Dec 2013 06:06:13 +0000 Received: from mlsv5.hitachi.co.jp (unknown [133.144.234.166]) by mail7.hitachi.co.jp (Postfix) with ESMTP id C075937ADF; Fri, 13 Dec 2013 15:06:11 +0900 (JST) Received: from mfilter06.hitachi.co.jp by mlsv5.hitachi.co.jp (8.13.1/8.13.1) id rBD66BG3009056; Fri, 13 Dec 2013 15:06:11 +0900 Received: from vshuts01.hitachi.co.jp (vshuts01.hitachi.co.jp [10.201.6.83]) by mfilter06.hitachi.co.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id rBD66ALV020964; Fri, 13 Dec 2013 15:06:11 +0900 Received: from gxml20a.ad.clb.hitachi.co.jp (unknown [158.213.157.160]) by vshuts01.hitachi.co.jp (Postfix) with ESMTP id A8FA52F00AB; Fri, 13 Dec 2013 15:06:10 +0900 (JST) Received: from [10.198.211.167] by gxml20a.ad.clb.hitachi.co.jp (Switch-3.1.10/Switch-3.1.9) id 5BD606A2C0000B938; Fri, 13 Dec 2013 15:06:10 +0900 Message-ID: <52AAA3CE.9010301@hitachi.com> Date: Fri, 13 Dec 2013 06:06:00 -0000 From: Masami Hiramatsu User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: Ingo Molnar Cc: Ananth N Mavinakayanahalli , Sandeepa Prabhu , x86@kernel.org, lkml , "Steven Rostedt (Red Hat)" , systemtap@sourceware.org, "David S. Miller" Subject: Re: Re: Re: [PATCH -tip v4 0/6] kprobes: introduce NOKPROBE_SYMBOL() and fixes crash bugs References: <20131204012841.22118.82992.stgit@kbuild-fedora.novalocal> <20131204084551.GA31772@gmail.com> <529FBA71.6070107@hitachi.com> <20131205102127.GA19923@gmail.com> <52A137B6.6030307@hitachi.com> <20131210152811.GA1195@gmail.com> <52A7CA0A.9060009@hitachi.com> <20131211133423.GB3101@gmail.com> <52A9515E.5050505@hitachi.com> <20131212140347.GA17059@gmail.com> <52AA9C55.1000103@hitachi.com> In-Reply-To: <52AA9C55.1000103@hitachi.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-q4/txt/msg00409.txt.bz2 (2013/12/13 14:34), Masami Hiramatsu wrote: >> Lets assume we allow a probe to be inserted in the single-step path. >> Such a probe will be an INT3 instruction and if it hits we get a >> recursive INT3 invocation. In that case the INT3 handler should simply >> restore the original instruction and _leave it so_. There's no >> single-stepping needed - the probe is confused and must be discarded. > > But how can we restore the protected kernel text? > If we use text_poke, we also need to prohibit probing on the text_poke > and functions called in the text_poke too. That just shifts the annotated > area to the text_poke. :( BTW, currently we mark the text_poke as nokprobe_symbol, but it should be removed. We don't call it from kprobes int3/debug handlers. The patches which removes __kprobes in this series are only for kprobe related files (arch/x86/kernel/kprobes/* or kernel/kprobes.c.) I think we should do it for other parts. Is it better to do that on this series? Thank you, -- Masami HIRAMATSU IT Management Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com