This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH -tip v6 04/11] kprobes: Jump optimization sysctl interface
- From: ebiederm at xmission dot com (Eric W. Biederman)
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Frederic Weisbecker <fweisbec at gmail dot com>, Ingo Molnar <mingo at elte dot hu>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, lkml <linux-kernel at vger dot kernel dot org>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>, Jim Keniston <jkenisto at us dot ibm dot com>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Christoph Hellwig <hch at infradead dot org>, Steven Rostedt <rostedt at goodmis dot org>, "H. Peter Anvin" <hpa at zytor dot com>, Anders Kaseorg <andersk at ksplice dot com>, Tim Abbott <tabbott at ksplice dot com>, Andi Kleen <andi at firstfloor dot org>, Jason Baron <jbaron at redhat dot com>, Mathieu Desnoyers <mathieu dot desnoyers at polymtl dot ca>
- Date: Fri, 27 Nov 2009 14:29:23 -0800
- Subject: Re: [PATCH -tip v6 04/11] kprobes: Jump optimization sysctl interface
- References: <20091125165510.6073.48721.stgit@harusame> <20091125165541.6073.43956.stgit@harusame>
Masami Hiramatsu <mhiramat@redhat.com> writes:
> Add /proc/sys/debug/kprobes-optimization sysctl which enables and disables
> kprobes jump optimization on the fly for debugging.
>
> Changes in v6:
> - Update comments and coding style.
>
This will break when it hits the linux-next. As ctl_name has been
removed in the sysctl tree. Not setting ctl_name is equivalent
to setting ctl_name = CTL_UNNUMBERED. It is 0 in both cases.
So you can safely drop touches of ctl_name.
Ideally you would also call register_sysctl_paths from kernel/kprobes.c
and not add to the ifdef horror that is kernel/sysctl.c but that
is probably more trouble than it is worth right now. One way or
another there is going to be at least a minor conflict when this code
merges with the sysctl tree.
> #include <asm/uaccess.h>
> #include <asm/processor.h>
> @@ -1621,6 +1622,18 @@ static struct ctl_table debug_table[] = {
> .proc_handler = proc_dointvec
> },
> #endif
> +#if defined(CONFIG_OPTPROBES)
> + {
> + .ctl_name = CTL_UNNUMBERED,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Please remove this line.
> + .procname = "kprobes-optimization",
> + .data = &sysctl_kprobes_optimization,
> + .maxlen = sizeof(int),
> + .mode = 0644,
> + .proc_handler = proc_kprobes_optimization_handler,
> + .extra1 = &zero,
> + .extra2 = &one,
> + },
> +#endif
> { .ctl_name = 0 }
> };
Eric