svn commit: r240026 - head/sys/kern

Garrett Cooper yanegomi at gmail.com
Sun Sep 2 21:20:54 UTC 2012


On Sun, Sep 2, 2012 at 2:16 PM, Garrett Cooper <yanegomi at gmail.com> wrote:
> On Sun, Sep 2, 2012 at 10:39 AM, Andrey Zonov <zont at 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


More information about the svn-src-all mailing list