Re: [PATCH 03/13] tracing/kprobes: Make stack and memory fetch functions static

From: Namhyung Kim
Date: Fri Aug 09 2013 - 03:35:25 EST


Hi Masami-san,

On Mon, 05 Aug 2013 18:04:09 +0900, Masami Hiramatsu wrote:
> (2013/07/31 18:03), Namhyung Kim wrote:
>> From: Namhyung Kim <namhyung.kim@xxxxxxx>
>>
>> Those fetch functions need to be implemented differently for kprobes
>> and uprobes. Since the symbol and deref fetch functions don't call
>> those directly anymore, we can make them static and implement them
>> separately.
>
> Hmm, I think this should be done in 1/13, since this is partially
> reverted it in the same series. If you concern about tweaking other
> one's patch, you can add you singed-off-by to it. :)

The problem is that it should be marked static after converting to
->fetch() member. Otherwise the symbol and deref fetch method won't see
memory fetch functions like:

/home/namhyung/project/linux/kernel/trace/trace_probe.c: In function âfetch_deref_u8â:
/home/namhyung/project/linux/kernel/trace/trace_probe.c:115:1: error: implicit declaration of function âfetch_memory_u8â [-Werror=implicit-function-declaration]
/home/namhyung/project/linux/kernel/trace/trace_probe.c: In function âfetch_deref_u16â:
/home/namhyung/project/linux/kernel/trace/trace_probe.c:115:1: error: implicit declaration of function âfetch_memory_u16â [-Werror=implicit-function-declaration]
/home/namhyung/project/linux/kernel/trace/trace_probe.c: In function âfetch_deref_u32â:
/home/namhyung/project/linux/kernel/trace/trace_probe.c:115:1: error: implicit declaration of function âfetch_memory_u32â [-Werror=implicit-function-declaration]
/home/namhyung/project/linux/kernel/trace/trace_probe.c: In function âfetch_deref_u64â:
/home/namhyung/project/linux/kernel/trace/trace_probe.c:115:1: error: implicit declaration of function âfetch_memory_u64â [-Werror=implicit-function-declaration]
/home/namhyung/project/linux/kernel/trace/trace_probe.c: In function âfetch_deref_stringâ:
/home/namhyung/project/linux/kernel/trace/trace_probe.c:116:1: error: implicit declaration of function âfetch_memory_stringâ [-Werror=implicit-function-declaration]
/home/namhyung/project/linux/kernel/trace/trace_probe.c: In function âfetch_deref_string_sizeâ:
/home/namhyung/project/linux/kernel/trace/trace_probe.c:117:1: error: implicit declaration of function âfetch_memory_string_sizeâ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors


Thanks,
Namhyung
--
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/