diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2023-12-12 07:37:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2023-12-12 07:37:22 +0000 |
commit | e844bfa2c53c6f4ad0c2d3eb7c473792a367387c (patch) | |
tree | cc6908934a7cfbe223a13ea717dba9ef16fd50bc /sys/arch/sh | |
parent | 568684ccff4377f0c3ebfeb53d963c498211bb0f (diff) |
The sigtramp was calling sigreturn(2), and upon failure exit(2), which
doesn't make sense anymore. It is better to just issue an illegal
instruction.
ok kettenis, with some misgivings about inconsistant approaches between
architectures.
In the future we could change sigreturn(2) to never return an exit code,
but always just terminate the process. We stopped this system call
from being callable ages ago with msyscall(2), and there is no stub for
it in libc.. maybe that's the next step to take?
Diffstat (limited to 'sys/arch/sh')
-rw-r--r-- | sys/arch/sh/sh/locore_subr.S | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/arch/sh/sh/locore_subr.S b/sys/arch/sh/sh/locore_subr.S index 2bd371ff887..944d1d2372e 100644 --- a/sys/arch/sh/sh/locore_subr.S +++ b/sys/arch/sh/sh/locore_subr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore_subr.S,v 1.18 2023/12/10 16:56:02 deraadt Exp $ */ +/* $OpenBSD: locore_subr.S,v 1.19 2023/12/12 07:37:21 deraadt Exp $ */ /* $NetBSD: locore_subr.S,v 1.28 2006/01/23 22:52:09 uwe Exp $ */ /* @@ -45,7 +45,7 @@ #include "assym.h" -#include <sys/syscall.h> /* SYS_sigreturn, SYS_exit */ +#include <sys/syscall.h> /* SYS_sigreturn */ #include <sh/asm.h> #include <sh/locore.h> #include <sh/param.h> /* UPAGES */ @@ -502,13 +502,11 @@ sigcodecall: trapa #0x80 /* and call sigreturn() */ .globl sigcoderet sigcoderet: - mov.l .L_SYS_exit, r0 - trapa #0x80 /* exit if sigreturn fails */ + sleep /* privileged -> illegal? */ /* NOTREACHED */ .align 2 .L_SYS_sigreturn: .long SYS_sigreturn -.L_SYS_exit: .long SYS_exit /* LINTSTUB: Var: char esigcode[1] */ .globl esigcode |