Re: [PATCH 1/2] vsprintf: introduce %pT format specifier

From: Ingo Molnar
Date: Wed Mar 23 2011 - 09:12:31 EST



* Namhyung Kim <namhyung@xxxxxxxxx> wrote:

> The %pT format specifier is for stack backtrace. Its handler
> sprint_trace() 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 will fix it.
>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxx>
> Cc: linux-arch@xxxxxxxxxxxxxxx
> ---
> include/linux/kallsyms.h | 7 +++++++
> kernel/kallsyms.c | 40 ++++++++++++++++++++++++++++++++++++++++
> lib/vsprintf.c | 7 ++++++-
> 3 files changed, 53 insertions(+), 1 deletions(-)

Looks useful. Please include before/after stack dump examples in the changelog,
to show the difference.

Thanks,

Ingo
--
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/