Re: [PATCH 1/2] Kprobes: Indicate kretprobe support in arch/<arch>/Kconfig - updated

From: Ananth N Mavinakayanahalli
Date: Tue Dec 11 2007 - 01:10:27 EST


On Mon, Dec 10, 2007 at 10:10:01AM -0500, Mathieu Desnoyers wrote:
> * Ananth N Mavinakayanahalli (ananth@xxxxxxxxxx) wrote:
> > On Mon, Dec 10, 2007 at 11:13:07AM +0100, Sam Ravnborg wrote:
> > > On Mon, Dec 10, 2007 at 03:22:22PM +0530, Ananth N Mavinakayanahalli wrote:
> > > > From: Ananth N Mavinakayanahalli <ananth@xxxxxxxxxx>
> > > >

<snip>

> > Index: linux-2.6.24-rc4/include/linux/kprobes.h
> > ===================================================================
> > --- linux-2.6.24-rc4.orig/include/linux/kprobes.h
> > +++ linux-2.6.24-rc4/include/linux/kprobes.h
> > @@ -125,11 +125,11 @@ struct jprobe {
> > DECLARE_PER_CPU(struct kprobe *, current_kprobe);
> > DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk);
> >
> > -#ifdef ARCH_SUPPORTS_KRETPROBES
> > +#ifdef CONFIG_HAVE_KRETPROBES
>
> Hi Ananth,
>
> I just want to point out a detail: if someone sets CONFIG_KPROBES to n,
> the CONFIG_HAVE_KPROBES is still y, and so is CONFIG_HAVE_KRETPROBES.
> However, I doubt that you want to activate this code in this case ?
> The code paths are OK because they are nested into CONFIG_KPROBES
> ifdefs (or not built due to dependency on CONFIG_KPROBES in the
> Makfile), but if one wants to use CONFIG_HAVE_KRETPROBE for something
> else (Makefile), then it could become a problem.
>
> Could we add a menu entry CONFIG_KRETPROBES that depends on
> CONFIG_HAVE_KRETPROBES and CONFIG_KPROBES, and also remove the
> CONFIG_HAVE_KPROBES dependency for the CONFIG_HAVE_KRETPROBE option ?
> This way, we would have much more flexibility (like specifiying if we
> want CONFIG_KRETPROBES to be default y or default n...)

Done... Updated patch coming up.

Ananth
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/