Module Name:    src
Committed By:   christos
Date:           Sun Oct 14 20:56:55 UTC 2012

Modified Files:
        src/sys/kern: kern_exec.c
        src/sys/sys: sysctl.h

Log Message:
remove KERN_USRSTACK


To generate a diff of this commit:
cvs rdiff -u -r1.356 -r1.357 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.202 -r1.203 src/sys/sys/sysctl.h

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

Modified files:

Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.356 src/sys/kern/kern_exec.c:1.357
--- src/sys/kern/kern_exec.c:1.356	Sat Oct 13 11:35:55 2012
+++ src/sys/kern/kern_exec.c	Sun Oct 14 16:56:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.356 2012/10/13 15:35:55 christos Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.357 2012/10/14 20:56:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.356 2012/10/13 15:35:55 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.357 2012/10/14 20:56:55 christos Exp $");
 
 #include "opt_exec.h"
 #include "opt_ktrace.h"
@@ -104,7 +104,6 @@ __KERNEL_RCSID(0, "$NetBSD: kern_exec.c,
 #include <sys/spawn.h>
 #include <sys/prot.h>
 #include <sys/cprng.h>
-#include <sys/sysctl.h>
 
 #include <uvm/uvm_extern.h>
 
@@ -1618,30 +1617,6 @@ exec_remove(struct execsw *esp, int coun
 	return 0;
 }
 
-static int
-sysctl_kern_usrstack(SYSCTLFN_ARGS)
-{  
-	u_long ptr;
-	struct sysctlnode node = *rnode;
-	node.sysctl_data = &ptr;
-	ptr = l->l_proc->p_stackbase;
-	return sysctl_lookup(SYSCTLFN_CALL(&node));
-}
-
-static void
-sysctl_kern_usrstack_setup(void)
-{
-	struct sysctllog *kern_usrstack_sysctllog;
-
-	kern_usrstack_sysctllog = NULL;
-	sysctl_createv(&kern_usrstack_sysctllog, 0, NULL, NULL,
-	    CTLFLAG_PERMANENT|CTLFLAG_READONLY,
-	    CTLTYPE_LONG, "usrstack", 
-	    SYSCTL_DESCR("User process stack base"),
-	    sysctl_kern_usrstack, 0, NULL, 0,
-	    CTL_KERN, KERN_USRSTACK, CTL_EOL);
-}
-
 /*
  * Initialize exec structures. If init_boot is true, also does necessary
  * one-time initialization (it's called from main() that way).
@@ -1665,7 +1640,6 @@ exec_init(int init_boot)
 		pool_init(&exec_pool, NCARGS, 0, 0, PR_NOALIGN|PR_NOTOUCH,
 		    "execargs", &exec_palloc, IPL_NONE);
 		pool_sethardlimit(&exec_pool, maxexec, "should not happen", 0);
-		sysctl_kern_usrstack_setup();
 	} else {
 		KASSERT(rw_write_held(&exec_lock));
 	}

Index: src/sys/sys/sysctl.h
diff -u src/sys/sys/sysctl.h:1.202 src/sys/sys/sysctl.h:1.203
--- src/sys/sys/sysctl.h:1.202	Sat Oct 13 11:35:56 2012
+++ src/sys/sys/sysctl.h	Sun Oct 14 16:56:55 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysctl.h,v 1.202 2012/10/13 15:35:56 christos Exp $	*/
+/*	$NetBSD: sysctl.h,v 1.203 2012/10/14 20:56:55 christos Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -273,8 +273,7 @@ struct ctlname {
 #define	KERN_SYSVIPC		82	/* node: SysV IPC parameters */
 #define	KERN_BOOTTIME		83	/* struct: time kernel was booted */
 #define	KERN_EVCNT		84	/* struct: evcnts */
-#define	KERN_USRSTACK		85	/* long: user stack base */
-#define	KERN_MAXID		86	/* number of valid kern ids */
+#define	KERN_MAXID		85	/* number of valid kern ids */
 
 
 #define	CTL_KERN_NAMES { \
@@ -363,7 +362,6 @@ struct ctlname {
 	{ "sysvipc", CTLTYPE_STRUCT }, \
 	{ "boottime", CTLTYPE_STRUCT }, \
 	{ "evcnt", CTLTYPE_STRUCT }, \
-	{ "usrstack", CTLTYPE_LONG }, \
 }
 
 /*

Reply via email to