And here is the sample module to use my jump-marker symbols : (yes, it works!) Adresses are taken by hand from /proc/kallsyms for now. ---BEGIN--- /* test-mark.c * */ #include <linux/marker.h> #include <linux/module.h> static void **__mark_subsys_mark1_call = (void**)0xf887580c; static void **__mark_subsys_mark1_jump_over = (void**)0xf8875814; static void **__mark_subsys_mark1_jump_call = (void*)0xf8875810; static void *__this_mark_empty_function = (void*)0xf8875000; static void *saved_over; void do_mark1(const char *format, int value) { printk("value is %d\n", value); } int init_module(void) { *__mark_subsys_mark1_call = (void*)do_mark1; saved_over = *__mark_subsys_mark1_jump_over; *__mark_subsys_mark1_jump_over = *__mark_subsys_mark1_jump_call; return 0; } void cleanup_module(void) { *__mark_subsys_mark1_jump_over = saved_over; *__mark_subsys_mark1_call = __this_mark_empty_function; } MODULE_LICENSE("GPL"); MODULE_AUTHOR("Mathieu Desnoyers"); MODULE_DESCRIPTION("Marker Test"); ---END--- OpenPGP public key: http://krystal.dyndns.org:8080/key/compudj.gpg Key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Attachment:
signature.asc
Description: Digital signature
- References:
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- From: [email protected] (Frank Ch. Eigler)
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- From: Mathieu Desnoyers <[email protected]>
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- From: "Frank Ch. Eigler" <[email protected]>
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- From: Mathieu Desnoyers <[email protected]>
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- From: "Frank Ch. Eigler" <[email protected]>
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- From: Karim Yaghmour <[email protected]>
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- From: "Frank Ch. Eigler" <[email protected]>
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- From: Mathieu Desnoyers <[email protected]>
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- From: Mathieu Desnoyers <[email protected]>
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- From: "Frank Ch. Eigler" <[email protected]>
- Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- Prev by Date: Re: drivers/char/random.c exported interfaces
- Next by Date: Re: [patch00/05]: Containers(V2)- Introduction
- Previous by thread: Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- Next by thread: Re: [PATCH] Linux Kernel Markers 0.2 for Linux 2.6.17
- Index(es):