1. 29 May, 2012 1 commit
    • Stephen Boyd's avatar
      vsprintf: fix %ps on non symbols when using kallsyms · 4796dd20
      Stephen Boyd authored
      Using %ps in a printk format will sometimes fail silently and print the
      empty string if the address passed in does not match a symbol that
      kallsyms knows about.  But using %pS will fall back to printing the full
      address if kallsyms can't find the symbol.  Make %ps act the same as %pS
      by falling back to printing the address.
      
      While we're here also make %ps print the module that a symbol comes from
      so that it matches what %pS already does.  Take this simple function for
      example (in a module):
      
      	static void test_printk(void)
      	{
      		int test;
      		pr_info("with pS: %pS\n", &test);
      		pr_info("with ps: %ps\n", &test);
      	}
      
      Before this patch:
      
       with pS: 0xdff7df44
       with ps:
      
      After this patch:
      
       with pS: 0xdff7df44
       with ps: 0xdff7df44
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4796dd20
  2. 01 Nov, 2011 1 commit
  3. 24 Mar, 2011 1 commit
    • Namhyung Kim's avatar
      vsprintf: Introduce %pB format specifier · 0f77a8d3
      Namhyung Kim authored
      The %pB format specifier is for stack backtrace. Its handler
      sprint_backtrace() does symbol lookup using (address-1) to
      ensure the address will not point outside of the function.
      
      If there is a tail-call to the function marked "noreturn",
      gcc optimized out the code after the call then causes saved
      return address points outside of the function (i.e. the start
      of the next function), so pollutes call trace somewhat.
      
      This patch adds the %pB printk mechanism that allows architecture
      call-trace printout functions to improve backtrace printouts.
      Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: linux-arch@vger.kernel.org
      LKML-Reference: <1300934550-21394-1-git-send-email-namhyung@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0f77a8d3
  4. 15 Dec, 2009 1 commit
  5. 31 Mar, 2009 1 commit
  6. 16 Oct, 2008 1 commit
    • Bjorn Helgaas's avatar
      vsprintf: use new vsprintf symbolic function pointer format · c80cfb04
      Bjorn Helgaas authored
      Use the '%pF' format to get rid of an "#ifdef DEBUG" and make some printks
      atomic.
      
      This removes the last in-tree uses of print_fn_descriptor_symbol().  I
      marked print_fn_descriptor_symbol() deprecated and scheduled it for
      removal next year to give time for out-of-tree modules to be updated.
      
      parisc's print_fn_descriptor_symbol() is currently broken there (it needs
      to dereference the function pointer similar to ia64 and power).  This
      patch shouldn't make anything worse, but it means we need to fix
      dereference_function_descriptor() instead of print_fn_descriptor_symbol()
      to get meaningful initcall_debug output.
      Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c80cfb04
  7. 30 Jul, 2008 1 commit
  8. 25 Jul, 2008 1 commit
  9. 16 May, 2008 1 commit
  10. 05 Nov, 2007 1 commit
  11. 17 Jul, 2007 1 commit
    • Tejun Heo's avatar
      kallsyms: make KSYM_NAME_LEN include space for trailing '\0' · 9281acea
      Tejun Heo authored
      KSYM_NAME_LEN is peculiar in that it does not include the space for the
      trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating
      buffer.  This is nonsense and error-prone.  Moreover, when the caller
      forgets that it's very likely to subtly bite back by corrupting the stack
      because the last position of the buffer is always cleared to zero.
      
      This patch increments KSYM_NAME_LEN by one and updates code accordingly.
      
      * off-by-one bug in asm-powerpc/kprobes.h::kprobe_lookup_name() macro
        is fixed.
      
      * Where MODULE_NAME_LEN and KSYM_NAME_LEN were used together,
        MODULE_NAME_LEN was treated as if it didn't include space for the
        trailing '\0'.  Fix it.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Acked-by: default avatarPaulo Marques <pmarques@grupopie.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9281acea
  12. 07 Jul, 2007 1 commit
    • Adrian Bunk's avatar
      include/linux/kallsyms.h must #include <linux/errno.h> · 40e48eed
      Adrian Bunk authored
      This patch fixes the following 2.6.22 regression with CONFIG_KALLSYMS=n:
      
      <--  snip  -->
      
      ...
        CC      arch/m32r/kernel/traps.o
      In file included from /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/arch/m32r/kernel/traps.c:14:
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h: In function 'lookup_symbol_name':
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: 'ERANGE' undeclared (first use in this function)
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: (Each undeclared identifier is reported only once
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: for each function it appears in.)
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h: In function 'lookup_symbol_attrs':
      /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:71: error: 'ERANGE' undeclared (first use in this function)
      make[2]: *** [arch/m32r/kernel/traps.o] Error 1
      
      <--  snip  -->
      Signed-off-by: Adrian Bunk's avatarAdrian Bunk <bunk@stusta.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      40e48eed
  13. 08 May, 2007 2 commits
  14. 30 Apr, 2007 1 commit
  15. 03 Oct, 2006 1 commit
    • Franck Bui-Huu's avatar
      [PATCH] Create kallsyms_lookup_size_offset() · ffc50891
      Franck Bui-Huu authored
      Some uses of kallsyms_lookup() do not need to find out the name of a symbol
      and its module's name it belongs.  This is specially true in arch specific
      code, which needs to unwind the stack to show the back trace during oops
      (mips is an example).  In this specific case, we just need to retreive the
      function's size and the offset of the active intruction inside it.
      
      Adds a new entry "kallsyms_lookup_size_offset()" This new entry does
      exactly the same as kallsyms_lookup() but does not require any buffers to
      store any names.
      
      It returns 0 if it fails otherwise 1.
      Signed-off-by: default avatarFranck Bui-Huu <vagabon.xyz@gmail.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      ffc50891
  16. 03 Jul, 2006 2 commits
  17. 26 Apr, 2006 1 commit
  18. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4