From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20638 invoked by alias); 4 Dec 2013 02:54:51 -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 20629 invoked by uid 89); 4 Dec 2013 02:54:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.9 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-wi0-f175.google.com Received: from Unknown (HELO mail-wi0-f175.google.com) (209.85.212.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 04 Dec 2013 02:54:50 +0000 Received: by mail-wi0-f175.google.com with SMTP id hi5so7565050wib.8 for ; Tue, 03 Dec 2013 18:54:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=1fmPt0x7DxtdbLFkoYEIaso1Z7QY7ByHjb0XhTPwN84=; b=irMCfeLxj8rxEB0k4v84JHcp+A69C2/E2TiBs6vAgJ5xKKeZqhW20IEExzeRXhv/AO osIujmniuA5sUQ1gyjjWH9+Amw9Pdh0Wr36Hchz7QZBerZAyODspTW7ygofT/YxKCCaB a6PNDCuuDx00qz72aae9pKnwhcO76cCIdDUxBTzhv93Ivl66Bhx4ItPaADEGbbU43hSv Tra/ybGFkjoRbPkgWr9ob+VLhVGCH1/gPs9jhzNO+5isIkaitLBIP0wSMz/TarzTv3+a hQX07s16kUuXl0+kdQs8J+Cc0w/jdLg1K9uM/YjNlL8Nyb53JbuWur89/vn/bYjDBjs/ K6TQ== X-Gm-Message-State: ALoCoQmi02Uye0gjZ2Z4ZzBVkLFJVnCU4p/a/lqFOJl3Bcr8n5QjELRMYzlIZ5sQAz7LjzVEqTBQ MIME-Version: 1.0 X-Received: by 10.194.235.230 with SMTP id up6mr21850346wjc.30.1386125680877; Tue, 03 Dec 2013 18:54:40 -0800 (PST) Received: by 10.194.219.7 with HTTP; Tue, 3 Dec 2013 18:54:40 -0800 (PST) In-Reply-To: <20131204012841.22118.82992.stgit@kbuild-fedora.novalocal> References: <20131204012841.22118.82992.stgit@kbuild-fedora.novalocal> Date: Wed, 04 Dec 2013 02:54:00 -0000 Message-ID: Subject: Re: [PATCH -tip v4 0/6] kprobes: introduce NOKPROBE_SYMBOL() and fixes crash bugs From: Sandeepa Prabhu To: Masami Hiramatsu Cc: Ingo Molnar , Ananth N Mavinakayanahalli , x86@kernel.org, lkml , "Steven Rostedt (Red Hat)" , systemtap@sourceware.org, "David S. Miller" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-q4/txt/msg00323.txt.bz2 On 4 December 2013 06:58, Masami Hiramatsu wrote: > Hi, > Here is the version 4 of NOKPORBE_SYMBOL series. > > In this version, I removed the cleanup patches and > add bugfixes I've found, since those bugs will be > critical. > Rest of the cleanup and visible blacklists will be > proposed later in another series. > > Oh, just one new thing, I added a new RFC patch which > removes the dependency of notify_die() from kprobes > miss-hit/recovery path. Since the notify_die() involves > locking and lockdep code which invokes a lot of heavy > printk functions etc. This helped me to minimize the > blacklist and provides more stability for kprobes. > Actually, most of int3 handlers are already called > from do_int3 directly, I think this change is acceptable > too. > > Here is the updates about NOKPROBE_SYMBOL(). > - Now _ASM_NOKPROBE() macro is introduced for assembly > symbols on x86. > - Rename kprobe_blackpoint to kprobe_blacklist_entry > and simplify it. Also NOKPROBE_SYMBOL() macro just > saves the address of non-probe-able symbols. > > --- > > Masami Hiramatsu (6): > kprobes: Prohibit probing on .entry.text code > kprobes: Introduce NOKPROBE_SYMBOL() macro for blacklist Hi Masami, Is it good idea to split "arch/x86" code from generic kernel changes? Then we just need to take above two patches for verifying it on arm64 or other platforms. Thanks, Sandeepa > [BUGFIX] kprobes/x86: Prohibit probing on debug_stack_* > [BUGFIX] x86: Prohibit probing on native_set_debugreg > [BUGFIX] x86: Prohibit probing on thunk functions and restore > [RFC] kprobes/x86: Call exception handlers directly from do_int3/do_debug > > > Documentation/kprobes.txt | 16 +++++ > arch/x86/include/asm/asm.h | 7 ++ > arch/x86/include/asm/kprobes.h | 2 + > arch/x86/kernel/cpu/common.c | 4 + > arch/x86/kernel/entry_32.S | 33 ----------- > arch/x86/kernel/entry_64.S | 20 ------- > arch/x86/kernel/kprobes/core.c | 32 ++++------ > arch/x86/kernel/paravirt.c | 5 ++ > arch/x86/kernel/traps.c | 10 +++ > arch/x86/lib/thunk_32.S | 3 + > arch/x86/lib/thunk_64.S | 3 + > include/asm-generic/vmlinux.lds.h | 9 +++ > include/linux/kprobes.h | 21 ++++++- > kernel/kprobes.c | 113 ++++++++++++++++++++----------------- > kernel/sched/core.c | 1 > 15 files changed, 147 insertions(+), 132 deletions(-) > > -- > Masami HIRAMATSU > IT Management Research Dept. Linux Technology Center > Hitachi, Ltd., Yokohama Research Laboratory > E-mail: masami.hiramatsu.pt@hitachi.com >