From: Nick Alcock Date: Fri, 29 Jan 2016 15:04:40 +0000 (+0000) Subject: dtrace: apply stack bias to user stack walks on SPARC X-Git-Tag: v4.1.12-111.0.20170907_2225~3^2~3^2~49 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=526869b757f8855bb193aa6a3950c3216bc92c84;p=users%2Fjedix%2Flinux-maple.git dtrace: apply stack bias to user stack walks on SPARC We were walking the stack without applying the stack bias, leading to a big chunk of the start of the stack being cut off (often all of it). Orabug: 22629102 Signed-off-by: Nick Alcock Acked-by: Kris Van Hees --- diff --git a/dtrace/dtrace_isa.c b/dtrace/dtrace_isa.c index f107b425d924a..8b5e8c40ccb62 100644 --- a/dtrace/dtrace_isa.c +++ b/dtrace/dtrace_isa.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "dtrace.h" @@ -232,8 +233,10 @@ unsigned long dtrace_getufpstack(uint64_t *pcstack, uint64_t *fpstack, #ifdef CONFIG_X86_64 tos = current_user_stack_pointer(); +#elif defined(STACK_BIAS) + tos = user_stack_pointer(current_pt_regs()) + STACK_BIAS; #else - tos = user_stack_pointer(current_pt_regs()); +#error Not x86-64 nor a stack-biased platform, porting needed #endif stack_vma = find_user_vma(p, mm, NULL, (unsigned long) tos, 0); if (!stack_vma ||