Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=eb609e52d188775da738a1ffd1e982e6212c77d7
Commit:     eb609e52d188775da738a1ffd1e982e6212c77d7
Parent:     14d1d2f25bca1c4ed45704c8019f6c971c40bba4
Author:     Srinivasa Ds <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 23 11:28:49 2007 +0530
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed May 2 20:04:32 2007 +1000

    [POWERPC] Transparently handle <.symbol> lookup for kprobes
    
    When data symbols are not present in kernel image, user needs to add
    dot(".") before function name explicitly, that he wants to probe in kprobe
    module on ppc64.
    
    for ex:-
    When data symbols are missing on ppc64,
    ====================
    [EMAIL PROTECTED] ~]# cat /proc/kallsyms | grep do_fork
    c00000000006283c T .do_fork
    ==============================
    User needs add "." to "do_fork"
    
    kp.symbol_name = ".do_fork";
    ============================
    
    This makes kprobe modules unportable.  This fixes the problem.
    
    Signed-off-by: Srinivasa Ds <[EMAIL PROTECTED]>
    Signed-off-by: Ananth N Mavinakayanahalli <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 include/asm-powerpc/kprobes.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h
index f850ca7..fc713e5 100644
--- a/include/asm-powerpc/kprobes.h
+++ b/include/asm-powerpc/kprobes.h
@@ -64,6 +64,12 @@ typedef unsigned int kprobe_opcode_t;
                                addr = *(kprobe_opcode_t **)addr;       \
                } else if (name[0] != '.')                              \
                        addr = *(kprobe_opcode_t **)addr;               \
+       } else {                                                        \
+               char dot_name[KSYM_NAME_LEN+1];                         \
+               dot_name[0] = '.';                                      \
+               dot_name[1] = '\0';                                     \
+               strncat(dot_name, name, KSYM_NAME_LEN);                 \
+               addr = (kprobe_opcode_t *)kallsyms_lookup_name(dot_name); \
        }                                                               \
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to