From owner-svn-src-head@FreeBSD.ORG Sun Sep 2 21:20:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5CCBC1065674; Sun, 2 Sep 2012 21:20:54 +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 7F95F8FC26; Sun, 2 Sep 2012 21:20:53 +0000 (UTC) Received: by obbun3 with SMTP id un3so10791604obb.13 for ; Sun, 02 Sep 2012 14:20:53 -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=3nKC5f3hqZ1N8DvLobwF76oILzv/tBCxOYQKpvo+nVQ=; b=X4lSYchn+77iknnRcpfU3EIloGY5OS61eSUcvU2SqQJzi4qgbfWvj1VF6YxnVRGxDP kOQWfPAWa/+ZrHfOnvdcoID37716SfBu3jcQPsUuaFOESFs/7rLXochNS5QnBb0iH0HA meKOF1ywcyxoR0taZeDqfjurQZdaH7KMLl6uTC4KV/xmaN7H5QIrTFLwLfw7IbzUrpQ8 aBYDxSQHLPPV2CYbI0TiZcM/guTGaJcRznQK+nYlIHS6srMYy1bera89ZruUaCVdC+dw 6rohOqwq/lzF+4m76AaZHDu3xpkK9KMN3AbLtTfh6TjtHV6eXsmNqwAu+1lBXpLvj4Fx O1dQ== MIME-Version: 1.0 Received: by 10.182.38.71 with SMTP id e7mr12606915obk.67.1346620853038; Sun, 02 Sep 2012 14:20:53 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Sun, 2 Sep 2012 14:20:53 -0700 (PDT) In-Reply-To: References: <201209021739.q82Hd3CE042578@svn.freebsd.org> Date: Sun, 2 Sep 2012 14:20:53 -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-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2012 21:20:54 -0000 On Sun, Sep 2, 2012 at 2:16 PM, Garrett Cooper wrote: > 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 ... > > Please add some basic sanity checking to init_param1 -- there's > absolutely nothing preventing me from passing in values <= 0 or other Correction: values == 0 with little effort (missed the part where it was using TUNABLE_ULONG_FETCH). You could get negative values though if you overflow the value passed in -- in part because the getenv* functions in kern_environment.c don't check for/handle overflow gracefully .. I had a patch out for this a while ago that never made it in. > non-performant (non-multiple of PAGE_SIZE, whacky ratios, etc) values. > Thanks, > -Garrett