Re: [PATCH] Move sysctl check into debugging section and don't make it default y

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Thursday, August 21, 2008 - 1:14 am

Andi Kleen <andi@firstfloor.org> writes:


That makes sense in a silly sort of way.  Making
allnoconfig not a particularly good minimal size check.


But it really isn't a debug option.


This code is the mechanism by which we do not accept any
new binary numbered sysctl into the kernel.

Andrew used to get them just often enough that I would get a message
ever couple of months.  What and why is our policy with respect to new
binary sysctls?

Since this code has yet to ship in any enterprise kernel to my knowledge
I expect there are going to be another raft load of kernel bugs discovered
in out of tree code when it does.  We have a decade or more of near
total neglect to make up for.

As for what the code does.  There is one big expensive (space wise)
check in there that ensures we don't add new sysctl binary names.
Beyond that the checks that sysctl_check performs are actual sanity
checks with the only expensive one being to ensure we don't register
the same name twice.  Real code hits those checks, and frequently not
in development, but in some weird production scenario.  And the code
only runs when we register a sysctl so it is cheap.

Which is the big difference between this code and debugging checks,
even when enabled it barely ever runs.

Now if you would like to fix the size issue.  The thing to do is to
add a type field or a conversion function onto those tables.  Which is
enough to implement all of our binary sysctls by looking up the ascii
equivalents and calling the proc handling functions.  Then those tables
would be much more then dead weight.

Eric
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Move sysctl check into debugging section and d ..., Eric W. Biederman, (Wed Aug 20, 11:14 pm)
Re: [PATCH] Move sysctl check into debugging section and d ..., Eric W. Biederman, (Thu Aug 21, 1:14 am)
Re: [PATCH] Move sysctl check into debugging section and d ..., Eric W. Biederman, (Thu Aug 21, 11:15 am)
Re: [PATCH] Move sysctl check into debugging section and d ..., Eric W. Biederman, (Thu Aug 21, 7:17 pm)