Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Sep 2012 14:20:53 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Andrey Zonov <zont@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r240026 - head/sys/kern
Message-ID:  <CAGH67wQ0P841iwL2hvZ%2BH%2BDfpwmCTZQ9cPwBGZ_f7UCW9wckhw@mail.gmail.com>
In-Reply-To: <CAGH67wSqqXdC3LiLYsebMC88Kt=H5Hu_MJRR2Ug1zjMS3Et%2BYQ@mail.gmail.com>
References:  <201209021739.q82Hd3CE042578@svn.freebsd.org> <CAGH67wSqqXdC3LiLYsebMC88Kt=H5Hu_MJRR2Ug1zjMS3Et%2BYQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 2, 2012 at 2:16 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
> On Sun, Sep 2, 2012 at 10:39 AM, Andrey Zonov <zont@freebsd.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wQ0P841iwL2hvZ%2BH%2BDfpwmCTZQ9cPwBGZ_f7UCW9wckhw>