summaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/ptrace.h
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2023-08-25 18:40:26 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2023-08-25 18:40:26 +0300
commit6933c11fb501a40681d43336b3e0eee9df2abee0 (patch)
tree09f0d8c6741c3f0f525bdca0b99deed74fe69d96 /arch/loongarch/include/asm/ptrace.h
parenta746ceb1f32cc375e983c4bc40378a72ff26c766 (diff)
downloadlinux-6933c11fb501a40681d43336b3e0eee9df2abee0.tar.xz
LoongArch: Do not kill the task in die() if notify_die() returns NOTIFY_STOP
If notify_die() returns NOTIFY_STOP, honor the return value from the handler chain invocation in die() and return without killing the task as, through a debugger, the fault may have been fixed. It makes sense even if ignoring the event will make the system unstable: by allowing access through a debugger it has been compromised already anyway. It makes our port consistent with x86, arm64, riscv and csky. Commit 20c0d2d44029 ("[PATCH] i386: pass proper trap numbers to die chain handlers") may be the earliest of similar changes. Link: https://lore.kernel.org/r/43DDF02E.76F0.0078.0@novell.com/ Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/asm/ptrace.h')
-rw-r--r--arch/loongarch/include/asm/ptrace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/include/asm/ptrace.h b/arch/loongarch/include/asm/ptrace.h
index 35f0958163ac..164bc90672e4 100644
--- a/arch/loongarch/include/asm/ptrace.h
+++ b/arch/loongarch/include/asm/ptrace.h
@@ -162,7 +162,7 @@ static inline void regs_set_return_value(struct pt_regs *regs, unsigned long val
#define instruction_pointer(regs) ((regs)->csr_era)
#define profile_pc(regs) instruction_pointer(regs)
-extern void die(const char *, struct pt_regs *) __noreturn;
+extern void die(const char *, struct pt_regs *);
static inline void die_if_kernel(const char *str, struct pt_regs *regs)
{