From e2d87711312fb707bf21e5ea5f999dd232694574 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 7 Apr 1997 11:42:09 +0000 Subject: [PATCH] Lower the spl() of the new process from splhigh() right away, since nothing else will lower it until either much later, or never(?) for kernel processes. This basically re-fixes what Bruce fixed in rev 1.29 of kern_fork.c, which was broken again now the child does not execute back up the fork() calling tree. --- sys/amd64/amd64/exception.S | 11 +++++++++-- sys/amd64/amd64/exception.s | 11 +++++++++-- sys/i386/i386/exception.s | 11 +++++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S index 5ecc1607e8bd..cfeea3f14a7d 100644 --- a/sys/amd64/amd64/exception.S +++ b/sys/amd64/amd64/exception.S @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exception.s,v 1.21 1997/02/22 09:32:16 peter Exp $ + * $Id: exception.s,v 1.22 1997/04/07 07:15:48 peter Exp $ */ #include "npx.h" /* NNPX */ @@ -251,7 +251,14 @@ IDTVEC(int0x80_syscall) jmp _doreti ENTRY(fork_trampoline) - pushl %ebx /* arg1 */ + pushl %ebx /* splz smashes regs */ + pushl %esi + + movl $SWI_AST_MASK,%eax /* spl0() */ + movl %eax,_cpl + call _splz + + popl %esi /* arg1 */ call %esi /* function */ addl $4,%esp /* cut from syscall */ diff --git a/sys/amd64/amd64/exception.s b/sys/amd64/amd64/exception.s index 5ecc1607e8bd..cfeea3f14a7d 100644 --- a/sys/amd64/amd64/exception.s +++ b/sys/amd64/amd64/exception.s @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exception.s,v 1.21 1997/02/22 09:32:16 peter Exp $ + * $Id: exception.s,v 1.22 1997/04/07 07:15:48 peter Exp $ */ #include "npx.h" /* NNPX */ @@ -251,7 +251,14 @@ IDTVEC(int0x80_syscall) jmp _doreti ENTRY(fork_trampoline) - pushl %ebx /* arg1 */ + pushl %ebx /* splz smashes regs */ + pushl %esi + + movl $SWI_AST_MASK,%eax /* spl0() */ + movl %eax,_cpl + call _splz + + popl %esi /* arg1 */ call %esi /* function */ addl $4,%esp /* cut from syscall */ diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s index 5ecc1607e8bd..cfeea3f14a7d 100644 --- a/sys/i386/i386/exception.s +++ b/sys/i386/i386/exception.s @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: exception.s,v 1.21 1997/02/22 09:32:16 peter Exp $ + * $Id: exception.s,v 1.22 1997/04/07 07:15:48 peter Exp $ */ #include "npx.h" /* NNPX */ @@ -251,7 +251,14 @@ IDTVEC(int0x80_syscall) jmp _doreti ENTRY(fork_trampoline) - pushl %ebx /* arg1 */ + pushl %ebx /* splz smashes regs */ + pushl %esi + + movl $SWI_AST_MASK,%eax /* spl0() */ + movl %eax,_cpl + call _splz + + popl %esi /* arg1 */ call %esi /* function */ addl $4,%esp /* cut from syscall */