This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH -tip v6 04/11] kprobes: Jump optimization sysctl interface


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]