[PATCH 3/6] kernel: use KSYM_NAME_LEN



Use KSYM_NAME_LEN instead of numeric value

Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx>
---

Index: linux-2.6.git/kernel/kprobes.c
===================================================================
--- linux-2.6.git.orig/kernel/kprobes.c 2008-01-21 23:14:47.000000000 +0300
+++ linux-2.6.git/kernel/kprobes.c 2008-01-23 19:20:53.000000000 +0300
@@ -872,7 +872,7 @@ static int __kprobes show_kprobe_addr(st
const char *sym = NULL;
unsigned int i = *(loff_t *) v;
unsigned long offset = 0;
- char *modname, namebuf[128];
+ char *modname, namebuf[KSYM_NAME_LEN];

head = &kprobe_table[i];
preempt_disable();
Index: linux-2.6.git/kernel/lockdep_proc.c
===================================================================
--- linux-2.6.git.orig/kernel/lockdep_proc.c 2008-01-21 19:35:32.000000000 +0300
+++ linux-2.6.git/kernel/lockdep_proc.c 2008-01-23 19:23:33.000000000 +0300
@@ -93,7 +93,7 @@ static unsigned long count_backward_deps

static void print_name(struct seq_file *m, struct lock_class *class)
{
- char str[128];
+ char str[KSYM_NAME_LEN];
const char *name = class->name;

if (!name) {
--
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/



Relevant Pages

  • [PATCH 6/6] SH64: use KSYM_NAME_LEN
    ... const char *sym; ... unsigned long offset; ... unsigned long prologue = 0; ...
    (Linux-Kernel)
  • [PATCH 5/6] PPC: use KSYM_NAME_LEN
    ... char *modname; ... const char *name = NULL; ... unsigned long offset, size; ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [PATCH RESEND 2/2] Fix some kallsyms_lookup() vs rmmod races
    ... Comment at the top of module_address_lookupsays it's for oops resolution so races are irrelevant, but in some cases it's reachable from regular code: ... unsigned long symsize, offset; ... static void xmon_print_symbol(unsigned long address, const char *mid, ... static inline const char *kallsyms_lookup(unsigned long addr, ...
    (Linux-Kernel)
  • [PATCH] kbuild: introduce blacklisting in modpost
    ... pass so we no longer need separate passes for init ... +static int number_prefix(const char *sym) ... Whitelist to allow certain references to pass with no warning. ... static int secref_whitelist(const char *modname, const char *tosec, ...
    (Linux-Kernel)
  • [PATCH] Create kallsyms_lookup_size_offset() [try #2]
    ... we just need to retreive the function's size and the offset of the ... static inline const char *kallsyms_lookup(unsigned long addr, ... - modname is set to NULL if it's in the kernel ...
    (Linux-Kernel)