Re: [PATCH 2/3] tracing/kprobes: Make Kconfig dependencies generic

From: Mike Frysinger
Date: Thu Feb 18 2010 - 10:03:19 EST


On Thu, Feb 18, 2010 at 09:50, Frederic Weisbecker wrote:
> On Thu, Feb 18, 2010 at 09:01:12AM -0500, Mike Frysinger wrote:
>> > --- a/arch/Kconfig
>> > +++ b/arch/Kconfig
>> > @@ -123,6 +123,10 @@ config USE_GENERIC_SMP_HELPERS
>> >
>> > Âconfig HAVE_REGS_AND_STACK_ACCESS_API
>> > Â Â Â Âbool
>> > + Â Â Â help
>> > + Â Â Â Â This symbol should be selected by an architecure if it supports
>> > + Â Â Â Â the API needed to access registers and stack entries from pt_regs.
>> > + Â Â Â Â For example the kprobes-based event tracer needs this API.
>>
>> a bit vague ... arent there headers/functions people could look at ?
>> perhaps you're talking about the regset functions (which is an API to
>> access registers in pt_regs) ? Âor you're talking about asm/syscall.h
>> (which is an API to access registers in pt_regs) ?
>>
>> i'm not asking to be a pain, i'm asking because i really havent a
>> clue. Âif i wanted to add support for this stuff to the Blackfin arch,
>> i wouldnt know where to start. Âeven after reading this help i'd fall
>> back to grepping arch/x86/ and trying to divine a starting point from
>> there.
>
> If an arch support kprobes, it just needs to select
> HAVE_REGS_AND_STACK_ACCESS_API to figure out quickly what is missing,
> as gcc will barf every missing clues you need.

so should this new Kconfig option have an appropriate depends on
KPROBES or something ?

> For now it is stored is asm/ptrace.h, but that might be split in
> the future, especially as ptrace has initially nothing related to
> that. A documentation that deals with filenames or API enumerations
> tend to be incidentally async with API evolutions.

i dont expect there to be per-function documentation here ... such
things below in the header files themselves (linux/regset.h is an
example of how to approach this). but having a tip of reading a file
or two (like HAVE_ARCH_TRACEHOOK) doesnt bit rot nearly as often. if
the common API expected of headers hasnt yet been split, then i guess
not much left to be done here.
-mike
--
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/