Date: Mon, 24 Jun 2002 17:10:03 -0700 (PDT) From: Cyrille Lefevre <cyrille.lefevre@laposte.net> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/39681: hidden kernel boot tunables added to sysctl as read-only mib Message-ID: <200206250010.g5P0A3l48077@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/39681; it has been noted by GNATS. From: Cyrille Lefevre <cyrille.lefevre@laposte.net> To: Bruce Evans <bde@zeta.org.au> Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/39681: hidden kernel boot tunables added to sysctl as read-only mib Date: Tue, 25 Jun 2002 02:09:31 +0200 On Sun, Jun 23, 2002 at 04:42:09PM +1000, Bruce Evans wrote: > On Sun, 23 Jun 2002, Cyrille Lefevre wrote: [snip] > > +SYSCTL_QUAD(_kern, OID_AUTO, maxtsiz, CTLFLAG_RD, > > + &maxtsiz, 0, "Max text size"); > > +SYSCTL_QUAD(_kern, OID_AUTO, dfldsiz, CTLFLAG_RD, > > + &dfldsiz, 0, "Initial max data size"); > > +SYSCTL_QUAD(_kern, OID_AUTO, maxdsiz, CTLFLAG_RD, > > + &maxdsiz, 0, "Max data size"); > > +SYSCTL_QUAD(_kern, OID_AUTO, dflssiz, CTLFLAG_RD, > > + &dflssiz, 0, "Initial max stack size"); > > +SYSCTL_QUAD(_kern, OID_AUTO, maxssiz, CTLFLAG_RD, > > + &maxssiz, 0, "Max stack size"); > > +SYSCTL_QUAD(_kern, OID_AUTO, sgrowsiz, CTLFLAG_RD, > > + &sgrowsiz, 0, "Amount to grow stack"); [snip] > Support for intmax_t's might not even be needed yet, or might not apply. > Most of the `siz' variables here have a wrong type (u_quad_t). They > should have type vm_size_t or possibly size_t. But there is a problem > importing and exporting variables with a typedef'ed types via sysctl() > and/or TUNABLE*_FETCH(). Sysctl and the tunable mechanism only support > a limited number of types. Even u_quad_t's are not supported. Large > u_quad_t's are clipped to QUAD_MAX, without checking for overflow of > course. u_quad_t's for the `siz' variables only work because the sizes > are normally < QUAD_MAX even on 64-bit machines. so, what to do ? Cyrille. -- Cyrille Lefevre mailto:cyrille.lefevre@laposte.net 12, Rue de Bizerte 75017 Paris http://clefevre.fr.st tel/fax: +33 (0)1 45 22 83 85 gsm: +33 (0)6 80 94 76 63 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206250010.g5P0A3l48077>
