From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752106AbdJEXNx (ORCPT ); Thu, 5 Oct 2017 19:13:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:35218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750965AbdJEXNv (ORCPT ); Thu, 5 Oct 2017 19:13:51 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D68A02190D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org From: Masami Hiramatsu To: Ingo Molnar Cc: Linus Torvalds , Peter Zijlstra , Alexei Starovoitov , Ananth N Mavinakayanahalli , "Paul E . McKenney" , Steven Rostedt , Thomas Gleixner , LKML , "H . Peter Anvin" , Anil S Keshavamurthy , "David S . Miller" , Kees Cook , Ian McDonald , Vlad Yasevich , Stephen Hemminger Subject: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs Date: Fri, 6 Oct 2017 08:13:15 +0900 Message-Id: <150724519527.5014.10207042218696587159.stgit@devbox> X-Mailer: git-send-email 2.13.6 User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series abolishes jprobe APIs and remove or disable related code. This is a preparation of removing all jprobe code (including kprobe's break_handler.) I'm not so sure how many jprobe users still exists, but please migrate your tool to trace-event or perf-probe. As we discussed this thread ( https://lkml.org/lkml/2017/10/2/386 ), we decided to remove jprobe. Nowadays ftrace and other tracing features are enough matured to replace jprobe use-cases. Users can safely use ftrace and perf probe etc. for their use cases. So we have better way. IOW, jprobe finished its task. People who still use jprobe, must migrate to other tracing features. Please consider to migrate your tool to following options. - Use trace-event to trace target function with arguments trace-event is a low-overhead (and almost no visible overhead if it is off) statically defined event interface. You can define new events and trace it via ftrace or any other tracing tools. See following urls, - https://lwn.net/Articles/379903/ - https://lwn.net/Articles/381064/ - https://lwn.net/Articles/383362/ - Use ftrace dynamic events (kprobe event) with perf-probe If you build your kernel with debug info (CONFIG_DEBUG_INFO), you can find which register/stack is assigned to which local variable or arguments by using perf-probe and set up new event to trace it. See following documents, - Documentation/trace/kprobetrace.txt - Documentation/trace/events.txt - tools/perf/Documentation/perf-probe.txt As far as I can see, tcp probe, dccp probe, sctp probe and lkdtm are using jprobe to probe function. Please consider to migrate. Thank you, --- Masami Hiramatsu (5): kprobes: Use ENOTSUPP instead of ENOSYS kprobes: Abolish jprobe APIs kprobes: Disable jprobe test code kprobes: Remove jprobe sample code kprobes: docs: Remove jprobe related document Documentation/kprobes.txt | 153 +++++++++++++------------------------- include/linux/kprobes.h | 52 ++++++------- kernel/kprobes.c | 6 + kernel/test_kprobes.c | 9 ++ samples/kprobes/Makefile | 2 samples/kprobes/jprobe_example.c | 67 ----------------- 6 files changed, 88 insertions(+), 201 deletions(-) delete mode 100644 samples/kprobes/jprobe_example.c -- Masami Hiramatsu (Linaro)