Subject: Re: CVS commit: src/sys/kern
To: Aymeric Vincent <vincent@labri.fr>
From: Andrew Brown <atatat@atatdot.net>
List: tech-kern
Date: 04/09/2004 11:17:28
On Fri, Apr 09, 2004 at 01:51:39PM +0200, Aymeric Vincent wrote:
>Bill Squier wrote:
>
>> Knowing briefly what the sysctl knob will change right there in the 
>> output of
>> sysctl -a seems like a win to me-- and a much bigger one that knowing
>> that my PIII supports the ABCDEFG-HOOKED-ON-PHONICS-WORKED-FOR-ME flag.
>
>This feature does not need to be in the kernel: it can be in sysctl(8). 

not really.  how is sysctl(8) to learn what new things are when they
randomly appear?  and if something disappears later, only to reappear
somewhere else (ie, at a different mib entry), how is sysctl(8) to
know how to apply the description?

>I guess the semantics for a given sysctl variable never or rarely 
>changes, so that if a description exists, it will likely be correct.

that is probably true, which is why the things that have been
described in the man page for a long time are still described in the
man page.

>And if the feature is so much used as you say (which I am inclined to 
>believe), the documentation slots will get filled in pretty quickly.
>
>I repeat what others have said too: the kernel is not the right place 
>for documentation.
>
>However, maybe the problem has its roots deeper: IIUC all the changes 
>made recently to the sysctl functionality were to avoid 
>desynchronization between kernel and userland; while we can pay some 
>little tradeoff for this because it really helps updating the kernel 
>and not the tools, pushing this to having the documentation in sync is 
>conceptually clean, but not appropriate for a kernel.

i'd like to point out, again, that this is an option.  if you use the
kernel option not to include them, you're no worse off than you are
today (well, three days ago) without them.  or would you prefer that
instead of this:

        sysctl_createv(clog, 0, NULL, NULL,
                       CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
                       CTLTYPE_INT, "securelevel",
                       SYSCTL_DESCR("System security level"),
                       sysctl_kern_securelevel, 0, &securelevel, 0,
                       CTL_KERN, KERN_SECURELVL, CTL_EOL);

it looks like this:

        /* SYSCTL_DESCR: kern.securelevel: System security level */
        sysctl_createv(clog, 0, NULL, NULL,
                       CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
                       CTLTYPE_INT, "securelevel",
                       sysctl_kern_securelevel, 0, &securelevel, 0,
                       CTL_KERN, KERN_SECURELVL, CTL_EOL);

so that something else could do the generation of some sort of message
catalog?

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."