• Josh Poimboeuf's avatar
    proc: Fix return address printk conversion specifer in /proc/<pid>/stack · 8b927d73
    Josh Poimboeuf authored
    When printing call return addresses found on a stack, /proc/<pid>/stack
    can sometimes give a confusing result.  If the call instruction was the
    last instruction in the function (which can happen when calling a
    noreturn function), '%pS' will incorrectly display the name of the
    function which happens to be next in the object code, rather than the
    name of the actual calling function.
    
    Use '%pB' instead, which was created for this exact purpose.
    Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Byungchul Park <byungchul.park@lge.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Nilay Vaish <nilayvaish@gmail.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/47ad2821e5ebdbed1fbf83fb85424ae4fbdf8b6e.1471535549.git.jpoimboe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    8b927d73
base.c 83 KB