Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys remove KERN_USRSTACK



details:   https://anonhg.NetBSD.org/src/rev/b7537698a2c8
branches:  trunk
changeset: 782086:b7537698a2c8
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 14 20:56:55 2012 +0000

description:
remove KERN_USRSTACK

diffstat:

 sys/kern/kern_exec.c |  30 ++----------------------------
 sys/sys/sysctl.h     |   6 ++----
 2 files changed, 4 insertions(+), 32 deletions(-)

diffs (92 lines):

diff -r 5940250d1e15 -r b7537698a2c8 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c      Sun Oct 14 20:33:17 2012 +0000
+++ b/sys/kern/kern_exec.c      Sun Oct 14 20:56:55 2012 +0000
@@ -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 @@
 #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 @@
        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 @@
                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));
        }
diff -r 5940250d1e15 -r b7537698a2c8 sys/sys/sysctl.h
--- a/sys/sys/sysctl.h  Sun Oct 14 20:33:17 2012 +0000
+++ b/sys/sys/sysctl.h  Sun Oct 14 20:56:55 2012 +0000
@@ -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 @@
 #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 @@
        { "sysvipc", CTLTYPE_STRUCT }, \
        { "boottime", CTLTYPE_STRUCT }, \
        { "evcnt", CTLTYPE_STRUCT }, \
-       { "usrstack", CTLTYPE_LONG }, \
 }
 
 /*



Home | Main Index | Thread Index | Old Index