From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23790 invoked by alias); 24 Dec 2013 06:39:33 -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 23782 invoked by uid 89); 24 Dec 2013 06:39:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qa0-f51.google.com Received: from mail-qa0-f51.google.com (HELO mail-qa0-f51.google.com) (209.85.216.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 24 Dec 2013 06:39:31 +0000 Received: by mail-qa0-f51.google.com with SMTP id o15so5872165qap.3 for ; Mon, 23 Dec 2013 22:39:29 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.49.49.40 with SMTP id r8mr31292617qen.31.1387867169645; Mon, 23 Dec 2013 22:39:29 -0800 (PST) Received: by 10.229.239.197 with HTTP; Mon, 23 Dec 2013 22:39:29 -0800 (PST) In-Reply-To: <52B8178F.5020607@hitachi.com> References: <20131219090353.14309.15496.stgit@kbuild-fedora.novalocal> <20131219090409.14309.25677.stgit@kbuild-fedora.novalocal> <52B3AD7D.2020104@hitachi.com> <52B3CABE.1080903@hitachi.com> <52B40C00.2060401@hitachi.com> <52B8178F.5020607@hitachi.com> Date: Tue, 24 Dec 2013 06:39:00 -0000 Message-ID: Subject: Re: Re: Re: [PATCH -tip v6 06/22] [BUGFIX] x86: Prohibit probing on memcpy/memset From: Jovi Zhangwei To: Masami Hiramatsu Cc: Ingo Molnar , linux-arch@vger.kernel.org, Ananth N Mavinakayanahalli , Sandeepa Prabhu , x86@kernel.org, lkml , "Steven Rostedt (Red Hat)" , Ingo Molnar , systemtap@sourceware.org, "H. Peter Anvin" , Thomas Gleixner , "David S. Miller" Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-q4/txt/msg00496.txt.bz2 On Mon, Dec 23, 2013 at 6:59 PM, Masami Hiramatsu wrote: > (2013/12/23 13:51), Jovi Zhangwei wrote: >> On Fri, Dec 20, 2013 at 5:21 PM, Masami Hiramatsu >> wrote: >>> (2013/12/20 17:31), Jovi Zhangwei wrote: >>>> On Fri, Dec 20, 2013 at 12:42 PM, Masami Hiramatsu >>>> wrote: >>>>> (2013/12/20 12:07), Jovi Zhangwei wrote: >>>>>> On Fri, Dec 20, 2013 at 10:37 AM, Masami Hiramatsu >>>>>> wrote: >>>>>>> Hi Jovi, >>>>>>> >>>>>>> (2013/12/19 18:37), Jovi Zhangwei wrote: >>>>>>>> Hi Masami, >>>>>>>> >>>>>>>> On Thu, Dec 19, 2013 at 5:04 PM, Masami Hiramatsu >>>>>>>> wrote: >>>>>>>>> memcpy/memset functions are fundamental functions and >>>>>>>>> those are involved in kprobe's exception handling. >>>>>>>>> Prohibit probing on them to avoid kernel crash. >>>>>>>>> >>>>>>>> Would you please let me know the LKML link of that bugfix, I cannot >>>>>>>> find it in my LKML fold. >>>>>>> >>>>>>> Yeah, that was found in my testing environment. >>>>>>> >>>>>>>> No objection on this patch. :) just want to know more, It seems there >>>>>>>> have no problem to probe memcpy in my box, maybe I didn't hit the >>>>>>>> crash code path. >>>>>>> >>>>>>> Ah, I see. Originally the problem happened when I put a probe on >>>>>>> __memcpy. And it looks the instances of memcpy and __memcpy are >>>>>>> same on x86-64. Thus I decided to blacklist both. (memset/__memset too) >>>>>>> Have you ever tried to probe __memcpy on your box? >>>>>>> >>>>>> Hmm, still no crash, __memcpy and __memset are both tested. >>>>>> >>>>>> I use below kprobe related config: >>>>>> >>>>>> CONFIG_KPROBES=y >>>>>> CONFIG_JUMP_LABEL=y >>>>>> CONFIG_OPTPROBES=y >>>>>> CONFIG_KPROBES_ON_FTRACE=y >>>>> >>>>> Hmm, I've added some debugging options. >>>>> >>>>> CONFIG_SLUB_DEBUG=y >>>>> CONFIG_X86_DEBUGCTLMSR=y >>>>> CONFIG_PNP_DEBUG_MESSAGES=y >>>>> CONFIG_DEBUG_INFO=y >>>>> CONFIG_DEBUG_FS=y >>>>> CONFIG_DEBUG_KERNEL=y >>>>> CONFIG_DEBUG_STACK_USAGE=y >>>>> CONFIG_DEBUG_MEMORY_INIT=y >>>>> CONFIG_DEBUG_STACKOVERFLOW=y >>>>> CONFIG_DEBUG_SPINLOCK=y >>>>> CONFIG_DEBUG_MUTEXES=y >>>>> CONFIG_DEBUG_LOCK_ALLOC=y >>>>> CONFIG_DEBUG_LOCKDEP=y >>>>> CONFIG_DEBUG_BUGVERBOSE=y >>>>> CONFIG_DEBUG_RODATA=y >>>>> CONFIG_DEBUG_BOOT_PARAMS=y >>>>> >>>>> I guess some of them might cause it. >>>>> >>>> I recompiled the kernel with those config enabled, unfortunately still no crash, >>>> I tested on 3.13.0-rc4, a fedora kvm box. >>> >>> Hmm, it's very odd. I'm running 3.13.0-rc4 x86-64 on the fedora >>> kvm box too. here is the full of my kconfig. >>> >> That configuration is still working for me, no crash for memcpy kprobe test. > > Would you do __memcpy test? or memcpy test? I only had a crash on the > __memcpy(__memset). > Still no crash, use your kernel config. memcpy and __memcpy have same address in /proc/kallsyms. Looks like a interesting problem. Thanks, Jovi.