diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2020-10-20 15:27:00 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2020-10-20 15:27:00 +0000 |
commit | d0253955516b23a31fcde9265bbf2005a75e092f (patch) | |
tree | f90bda1a6c80c1abeadb8df69075511ceb7cd24e /lib | |
parent | 9db3dbee93cdf4560a1155d42531437a7b6eb980 (diff) |
Use a trap instruction that unconditionally terminates the process.
OK deraadt@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csu/mips64/md_init.h | 4 | ||||
-rw-r--r-- | lib/libc/arch/mips64/sys/tfork_thread.S | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/csu/mips64/md_init.h b/lib/csu/mips64/md_init.h index c5ed64c295f..ad4e70af95d 100644 --- a/lib/csu/mips64/md_init.h +++ b/lib/csu/mips64/md_init.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md_init.h,v 1.19 2020/10/15 16:30:23 deraadt Exp $ */ +/* $OpenBSD: md_init.h,v 1.20 2020/10/20 15:26:59 visa Exp $ */ /*- * Copyright (c) 2001 Ross Harvey @@ -146,7 +146,7 @@ "_dl_exit: \n" \ " li $v0, " STR(SYS_exit) " \n" \ " syscall \n" \ - " break 0 \n" \ + " teq $zero, $zero, 0x52 \n" \ " .end _dl_exit \n" \ " .previous") diff --git a/lib/libc/arch/mips64/sys/tfork_thread.S b/lib/libc/arch/mips64/sys/tfork_thread.S index 413463fe4e5..14ef3a38b0a 100644 --- a/lib/libc/arch/mips64/sys/tfork_thread.S +++ b/lib/libc/arch/mips64/sys/tfork_thread.S @@ -1,4 +1,4 @@ -/* $OpenBSD: tfork_thread.S,v 1.3 2020/10/18 14:28:18 deraadt Exp $ */ +/* $OpenBSD: tfork_thread.S,v 1.4 2020/10/20 15:26:59 visa Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -65,7 +65,7 @@ LEAF(__tfork_thread, FRAMESZ) move a0, zero __DO_SYSCALL(__threxit) - break 0 + teq zero, zero, 0x52 9: /* |