From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932301AbdJJOCz (ORCPT ); Tue, 10 Oct 2017 10:02:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:43316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932288AbdJJOCw (ORCPT ); Tue, 10 Oct 2017 10:02:52 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A72C21878 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Tue, 10 Oct 2017 10:02:48 -0400 From: Steven Rostedt To: Jonathan Corbet Cc: Masami Hiramatsu , Kees Cook , Ingo Molnar , Linus Torvalds , Peter Zijlstra , Alexei Starovoitov , Ananth N Mavinakayanahalli , "Paul E . McKenney" , Thomas Gleixner , LKML , "H . Peter Anvin" , Anil S Keshavamurthy , "David S . Miller" , Ian McDonald , Vlad Yasevich , Stephen Hemminger Subject: Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs Message-ID: <20171010100248.54ac7651@gandalf.local.home> In-Reply-To: <20171009093350.2680fcdf@lwn.net> References: <150724519527.5014.10207042218696587159.stgit@devbox> <20171005195808.2525a155@vmware.local.home> <20171006134959.e50c904ba6f302126cf4418c@kernel.org> <20171006113430.2c31561b@gandalf.local.home> <20171009093350.2680fcdf@lwn.net> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 Oct 2017 09:33:50 -0600 Jonathan Corbet wrote: > > Using ftrace to hook to functions > > ================================= > > > > Copyright 2017 VMware Inc. > > Author: Steven Rostedt > > License: The GNU Free Documentation License, Version 1.2 > > (dual licensed under the GPL v2) > > > > Written for: 4.14 > > Experience says that strings like this go obsolete in a hurry, so they > don't really reflect the state of the document. The git history tends to > be rather more reliable. And this document is about to become stale by 4.15 ;-) > > The ftrace FLAGS > > ================ > > > > The ftrace_ops flags are all defined and documented in include/linux/ftrace.h. > > Some of the flags are used for internal infrastructure of ftrace, but the > > ones that users should be aware of are the following: > > > > (All of these are prefixed with FTRACE_OPS_FL_) > > I hate to say it, but you'll reduce the cognitive load on the reader if you > just spell the flags out. > > > PER_CPU - When set, the callback can be enabled or disabled per cpu with the > > following functions: > > > > void ftrace_function_local_enable(struct ftrace_ops *ops); > > void ftrace_function_local_disable(struct ftrace_ops *ops); > > > > These two functions must be called with preemption disabled. > > s/per cpu/per-CPU/ > > More importantly, though, what does this actually mean? Presumably that > the callback is only called if the function is hit on an enabled CPU? It > seems you can only enable/disable the local CPU? Is the default state > enabled or disabled? Inquiring minds want to know. This may be removed by 4.15. Link: http://lkml.kernel.org/r/20171010130448.4goubbka7e4bguar@hirez.programming.kicks-ass.net -- Steve