From 526869b757f8855bb193aa6a3950c3216bc92c84 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 29 Jan 2016 15:04:40 +0000 Subject: [PATCH] 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 --- dtrace/dtrace_isa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dtrace/dtrace_isa.c b/dtrace/dtrace_isa.c index f107b425d924..8b5e8c40ccb6 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 || -- 2.50.1