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 <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
#include <linux/smp.h>
#include <linux/uaccess.h>
#include <asm/cacheflush.h>
+#include <asm/ptrace.h>
#include <asm/stacktrace.h>
#include "dtrace.h"
#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 ||