10 #include <linux/module.h>
11 #include <linux/ptrace.h>
12 #include <linux/kexec.h>
17 #include <asm/stacktrace.h>
21 unsigned long *
stack,
unsigned long bp,
34 stack = (
unsigned long *)task->
thread.sp;
47 stack = (
unsigned long *)context->previous_esp;
50 if (ops->
stack(data,
"IRQ") < 0)
59 unsigned long *
sp,
unsigned long bp,
char *log_lvl)
66 sp = (
unsigned long *)task->
thread.sp;
68 sp = (
unsigned long *)&
sp;
73 if (kstack_end(stack))
91 pr_emerg(
"Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)\n",
98 if (!user_mode_vm(regs)) {
99 unsigned int code_prologue =
code_bytes * 43 / 64;
109 ip = (
u8 *)regs->ip - code_prologue;
113 code_len = code_len - code_prologue + 1;
115 for (i = 0; i < code_len; i++, ip++) {
121 if (ip == (
u8 *)regs->ip)
139 return ud2 == 0x0b0f;