]> git.baikalelectronics.ru Git - kernel.git/commit
vsprintf: Introduce %pB format specifier
authorNamhyung Kim <namhyung@gmail.com>
Thu, 24 Mar 2011 02:42:29 +0000 (11:42 +0900)
committerIngo Molnar <mingo@elte.hu>
Thu, 24 Mar 2011 07:36:10 +0000 (08:36 +0100)
commite5913094578980522119e9701db7c9f77b167f8f
treeedc37c211adce744100d4776e4a28fb868c8b3c0
parent6c86eaefc63b68dce5ce519c33d80d857ed1345f
vsprintf: Introduce %pB format specifier

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: Namhyung Kim <namhyung@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Frederic 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: Ingo Molnar <mingo@elte.hu>
include/linux/kallsyms.h
kernel/kallsyms.c
lib/vsprintf.c