Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Sep 2012 11:02:33 +0400
From:      Andrey Zonov <zont@FreeBSD.org>
To:        Garrett Cooper <yanegomi@gmail.com>
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:  <50445609.8070902@FreeBSD.org>
In-Reply-To: <CAGH67wQ0P841iwL2hvZ%2BH%2BDfpwmCTZQ9cPwBGZ_f7UCW9wckhw@mail.gmail.com>
References:  <201209021739.q82Hd3CE042578@svn.freebsd.org> <CAGH67wSqqXdC3LiLYsebMC88Kt=H5Hu_MJRR2Ug1zjMS3Et%2BYQ@mail.gmail.com> <CAGH67wQ0P841iwL2hvZ%2BH%2BDfpwmCTZQ9cPwBGZ_f7UCW9wckhw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig1DE189EBF5C3297B1F032688
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 9/3/12 1:20 AM, Garrett Cooper wrote:
> On Sun, Sep 2, 2012 at 2:16 PM, Garrett Cooper <yanegomi@gmail.com> wro=
te:
>> 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=
=2Emaxssiz
>>>     and kern.sgrowsiz sysctls writable.
>>>
>>>   Approved by:  kib (mentor)
>>>
>>> Modified:
>>>   head/sys/kern/subr_param.c
>=20
> ...
>=20
>>
>>     Please add some basic sanity checking to init_param1 -- there's
>> absolutely nothing preventing me from passing in values <=3D 0 or othe=
r
>=20
> Correction: values =3D=3D 0 with little effort (missed the part where i=
t
> 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.
>=20
>> non-performant (non-multiple of PAGE_SIZE, whacky ratios, etc) values.=

>> Thanks,
>> -Garrett

I thought of sanity checking here, but there weren't for tunables and I
did't want to add any "magic numbers" in this code.  I don't think that
we should check for multiple of PAGE_SIZE, may be only for sgrowsiz and
even not checking, just rounding up.

If you have those "magic numbers" I would love to add it.

--=20
Andrey Zonov


--------------enig1DE189EBF5C3297B1F032688
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQEcBAEBAgAGBQJQRFYLAAoJEBWLemxX/CvT6WAH/RjhZHIPQpHNIMa0hu7i1K6e
5DVNt1MmnBEomlRDYXHKIrYrAienvaoqyyXKjYVVGm3Vmw3Hs6rwNEg+aP2SbF1U
mTDqHJdViWoil1K2EjAGMtnRleBUkDe+XyjHKLgyf+gu60br1O09ND77GdVxj0nh
cP8SenPUoQs/V+4DEn8Sn9oZDdq3LZQgntJGaxPUs1dfGrDBCdsk4yWUE0blD+f+
Du3kkKUwBh9iJ0cLX46hgYcRhVNBCxejjsPUqpJxbW0QBML3FEejbXtx0bUlETpu
pk27Y837KBQETt9ODja5rcF1fw1kGaSLnmkPBr30qaZSYf/wdrRIz2OYHrGk81E=
=eRXG
-----END PGP SIGNATURE-----

--------------enig1DE189EBF5C3297B1F032688--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50445609.8070902>