summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1997-04-07 11:42:09 +0000
committerpeter <peter@FreeBSD.org>1997-04-07 11:42:09 +0000
commite225ab4fac5118699c4f4710b243c43658ff4bf6 (patch)
tree88c3ca228a6c94499a802b7fab2ce56ce2efb5e2
parenta3b6c4ba1cebfc3772ffa0392d22fd320b96f6c1 (diff)
downloadFreeBSD-src-e225ab4fac5118699c4f4710b243c43658ff4bf6.zip
FreeBSD-src-e225ab4fac5118699c4f4710b243c43658ff4bf6.tar.gz
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.
-rw-r--r--sys/amd64/amd64/exception.S11
-rw-r--r--sys/amd64/amd64/exception.s11
-rw-r--r--sys/i386/i386/exception.s11
3 files changed, 27 insertions, 6 deletions
diff --git a/sys/amd64/amd64/exception.S b/sys/amd64/amd64/exception.S
index 5ecc160..cfeea3f 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 5ecc160..cfeea3f 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 5ecc160..cfeea3f 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 */
OpenPOWER on IntegriCloud