Module Name:    src
Committed By:   reinoud
Date:           Thu Jan  5 17:18:02 UTC 2012

Modified Files:
        src/sys/arch/x86/x86: syscall.c

Log Message:
Oops, forgot to revert this patch too... thanks Greg for finding it :-/


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/x86/syscall.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/syscall.c
diff -u src/sys/arch/x86/x86/syscall.c:1.6 src/sys/arch/x86/x86/syscall.c:1.7
--- src/sys/arch/x86/x86/syscall.c:1.6	Tue Dec 20 15:41:50 2011
+++ src/sys/arch/x86/x86/syscall.c	Thu Jan  5 17:18:02 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: syscall.c,v 1.6 2011/12/20 15:41:50 reinoud Exp $	*/
+/*	$NetBSD: syscall.c,v 1.7 2012/01/05 17:18:02 reinoud Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.6 2011/12/20 15:41:50 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.7 2012/01/05 17:18:02 reinoud Exp $");
 
 #include "opt_sa.h"
 
@@ -129,32 +129,6 @@ syscall(struct trapframe *frame)
 	 */
 	rip_call = X86_TF_RIP(frame) - frame->tf_err;
 
-	/* are we allowed to execute system calls in this memory space? */
-	if (p->p_flag & PK_CHKNOSYSCALL) {
-		map = &(p->p_vmspace->vm_map);
-		vm_map_lock(map);
-
-		if (uvm_map_checkattr(map, rip_call, rip_call + frame->tf_err,
-					MAP_NOSYSCALLS)) {
-			ksiginfo_t ksi;
-
-			vm_map_unlock(map);
-			X86_TF_RIP(frame) = rip_call;
-
-			/* treat as illegal instruction */
-			KSI_INIT_TRAP(&ksi);
-			ksi.ksi_signo = SIGILL;
-			ksi.ksi_code = ILL_ILLTRP;
-			ksi.ksi_addr = (void *) X86_TF_RIP(frame);
-			ksi.ksi_trap = 0; /* XXX ? */
-			trapsignal(l, &ksi);
-			userret(l);
-			return;
-		}
-
-		vm_map_unlock(map);
-	}
-
 	code = X86_TF_RAX(frame) & (SYS_NSYSENT - 1);
 	callp = p->p_emul->e_sysent + code;
 

Reply via email to