summaryrefslogtreecommitdiffstats
path: root/arch/um/include
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2013-09-23 17:38:02 +0200
committerRichard Weinberger <richard@nod.at>2013-11-17 11:27:30 +0100
commitf72c22e45e8f8fe78c7f793d983bee5bed63497e (patch)
tree0e3051e2d357548d086a2ac00c4bfe201fe4e31d /arch/um/include
parent9d1ee8ce92e16c6aa0a3fd91ee8ed9e403b3a2eb (diff)
um: Make stack trace reliable against kernel mode faults
As UML uses an alternative signal stack we cannot use the current stack pointer for stack dumping if UML itself dies by SIGSEGV. To bypass this issue we save regs taken from mcontext in our segv handler into thread_struct and use these regs to obtain the stack pointer in show_stack(). Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include')
-rw-r--r--arch/um/include/asm/processor-generic.h1
-rw-r--r--arch/um/include/shared/os.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h
index c03cd5a0236..90469031297 100644
--- a/arch/um/include/asm/processor-generic.h
+++ b/arch/um/include/asm/processor-generic.h
@@ -21,6 +21,7 @@ struct mm_struct;
struct thread_struct {
struct task_struct *saved_task;
struct pt_regs regs;
+ struct pt_regs *segv_regs;
int singlestep_syscall;
void *fault_addr;
jmp_buf *fault_catcher;
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h
index 021104d98cb..75298d3358e 100644
--- a/arch/um/include/shared/os.h
+++ b/arch/um/include/shared/os.h
@@ -227,6 +227,7 @@ extern void block_signals(void);
extern void unblock_signals(void);
extern int get_signals(void);
extern int set_signals(int enable);
+extern int os_is_signal_stack(void);
/* util.c */
extern void stack_protections(unsigned long address);