summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/ptrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/ptrace.h')
-rw-r--r--include/asm-mips/ptrace.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h
index 5f3a907..8a1f2b6 100644
--- a/include/asm-mips/ptrace.h
+++ b/include/asm-mips/ptrace.h
@@ -80,10 +80,16 @@ struct pt_regs {
#define instruction_pointer(regs) ((regs)->cp0_epc)
#define profile_pc(regs) instruction_pointer(regs)
-extern void show_regs(struct pt_regs *);
-
extern asmlinkage void do_syscall_trace(struct pt_regs *regs, int entryexit);
+extern NORET_TYPE void die(const char *, struct pt_regs *);
+
+static inline void die_if_kernel(const char *str, struct pt_regs *regs)
+{
+ if (unlikely(!user_mode(regs)))
+ die(str, regs);
+}
+
#endif
#endif /* _ASM_PTRACE_H */
OpenPOWER on IntegriCloud