From: ebiederm@xmission.com (Eric W. Biederman)
To: Andi Kleen <andi@firstfloor.org>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH] Move sysctl check into debugging section and don't make it default y
Date: Thu, 21 Aug 2008 01:14:18 -0700 [thread overview]
Message-ID: <m1abf6vl7p.fsf@frodo.ebiederm.org> (raw)
In-Reply-To: <20080821064009.GB18831@one.firstfloor.org> (Andi Kleen's message of "Thu, 21 Aug 2008 08:40:09 +0200")
Andi Kleen <andi@firstfloor.org> writes:
>> What is a feature change like this doing coming in after the
>> merge window?
>
> I considered it a "anti bloat bugfix". Adding 30k of
> object code to allno was a bit too much.
>
>> Why doesn't an allnoconfig disable sysctl all together?
>
> Because it depends on EMBEDDED and EMBEDDED is not y. Yes it's not
> intuitive, on the other hand the end result is reasonable.
That makes sense in a silly sort of way. Making
allnoconfig not a particularly good minimal size check.
>> These are the only checks we have against someone doing something
>> nasty in the sysctl hierarchy. We have proven that we don't
>> have the discipline to do the right thing with code in the
>> core kernel. I expect out of tree code will be much worse.
>
> My assumption is that they will be run at least once during
> a release cycle by someone and then the messages will appear
> and be reported. We do the same thing with a lot of other
> debug options (lockdep, slab debug, sleep debug etc.,). There's no
> need for this one to be special.
But it really isn't a debug option.
> Also I'm not sure the check is all that useful anyways. We
> should just not accept any new binary numbered sysctl, and
> that's nearly the case anyways.
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
next prev parent reply other threads:[~2008-08-21 8:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-16 5:53 [PATCH] Move sysctl check into debugging section and don't make it default y Andi Kleen
2008-08-21 6:14 ` Eric W. Biederman
2008-08-21 6:40 ` Andi Kleen
2008-08-21 8:14 ` Eric W. Biederman [this message]
2008-08-21 18:15 ` Eric W. Biederman
2008-08-22 1:57 ` Andi Kleen
2008-08-22 2:17 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1abf6vl7p.fsf@frodo.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox