From owner-svn-src-all@FreeBSD.ORG Sun Sep 2 21:16:11 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67B2A1065676; Sun, 2 Sep 2012 21:16:11 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id BE5528FC16; Sun, 2 Sep 2012 21:16:10 +0000 (UTC) Received: by obbun3 with SMTP id un3so10787724obb.13 for ; Sun, 02 Sep 2012 14:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=dIAiY9C7UOZ3H958OWVH22XJOvk+ToPB1noCc2A7gYY=; b=SHKH6sS18AStLaJ2KGNLws9cG8AVVZOwLVNI8HtKIz1Geon9A0lCIOJdoB/89Z4J4p /aybi5xiTnM0NLUhewQNsjaFlSpN7MK8B881owNSccEVhX9OSVdna81uKOP4bu3ki4b0 BJeJg1FgI5NnIXV5FkYdmbUJwqFtq/RFLMxFhoGw9IL65RoyQlYFSivPQI0jm75UQCm2 YgY5CHiCAHeKMzb/eWWeWOjm9lJCZKhbmGopIbAXY16PTTpwbI5PGwvJP8IX19odi0+9 acYzvwgx+GVmFIotlQlFKwiqGcSXmE89cXszyEUPM9VCyBAnFhIE+CeOzS89xnmkRYwH N4QA== MIME-Version: 1.0 Received: by 10.60.27.9 with SMTP id p9mr12126825oeg.69.1346620570227; Sun, 02 Sep 2012 14:16:10 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Sun, 2 Sep 2012 14:16:10 -0700 (PDT) In-Reply-To: <201209021739.q82Hd3CE042578@svn.freebsd.org> References: <201209021739.q82Hd3CE042578@svn.freebsd.org> Date: Sun, 2 Sep 2012 14:16:10 -0700 Message-ID: From: Garrett Cooper To: Andrey Zonov Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240026 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 21:16:11 -0000 On Sun, Sep 2, 2012 at 10:39 AM, Andrey Zonov wrote: > Author: zont > Date: Sun Sep 2 17:39:02 2012 > New Revision: 240026 > URL: http://svn.freebsd.org/changeset/base/240026 > > Log: > - Make kern.maxtsiz, kern.dfldsiz, kern.maxdsiz, kern.dflssiz, kern.maxssiz > and kern.sgrowsiz sysctls writable. > > Approved by: kib (mentor) > > Modified: > head/sys/kern/subr_param.c > > Modified: head/sys/kern/subr_param.c > ============================================================================== > --- head/sys/kern/subr_param.c Sun Sep 2 15:27:20 2012 (r240025) > +++ head/sys/kern/subr_param.c Sun Sep 2 17:39:02 2012 (r240026) > @@ -119,18 +119,18 @@ SYSCTL_LONG(_kern, OID_AUTO, maxswzone, > "Maximum memory for swap metadata"); > SYSCTL_LONG(_kern, OID_AUTO, maxbcache, CTLFLAG_RDTUN, &maxbcache, 0, > "Maximum value of vfs.maxbufspace"); > -SYSCTL_ULONG(_kern, OID_AUTO, maxtsiz, CTLFLAG_RDTUN, &maxtsiz, 0, > +SYSCTL_ULONG(_kern, OID_AUTO, maxtsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxtsiz, 0, > "Maximum text size"); > -SYSCTL_ULONG(_kern, OID_AUTO, dfldsiz, CTLFLAG_RDTUN, &dfldsiz, 0, > +SYSCTL_ULONG(_kern, OID_AUTO, dfldsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &dfldsiz, 0, > "Initial data size limit"); > -SYSCTL_ULONG(_kern, OID_AUTO, maxdsiz, CTLFLAG_RDTUN, &maxdsiz, 0, > +SYSCTL_ULONG(_kern, OID_AUTO, maxdsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxdsiz, 0, > "Maximum data size"); > -SYSCTL_ULONG(_kern, OID_AUTO, dflssiz, CTLFLAG_RDTUN, &dflssiz, 0, > +SYSCTL_ULONG(_kern, OID_AUTO, dflssiz, CTLFLAG_RDTUN | CTLFLAG_RW, &dflssiz, 0, > "Initial stack size limit"); > -SYSCTL_ULONG(_kern, OID_AUTO, maxssiz, CTLFLAG_RDTUN, &maxssiz, 0, > +SYSCTL_ULONG(_kern, OID_AUTO, maxssiz, CTLFLAG_RDTUN | CTLFLAG_RW, &maxssiz, 0, > "Maximum stack size"); > -SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, CTLFLAG_RDTUN, &sgrowsiz, 0, > - "Amount to grow stack on a stack fault"); > +SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, CTLFLAG_RDTUN | CTLFLAG_RW, &sgrowsiz, > + 0, "Amount to grow stack on a stack fault"); > SYSCTL_PROC(_kern, OID_AUTO, vm_guest, CTLFLAG_RD | CTLTYPE_STRING, > NULL, 0, sysctl_kern_vm_guest, "A", > "Virtual machine guest detected? (none|generic|xen)"); Please add some basic sanity checking to init_param1 -- there's absolutely nothing preventing me from passing in values <= 0 or other non-performant (non-multiple of PAGE_SIZE, whacky ratios, etc) values. Thanks, -Garrett