From: Andrew Morton <akpm@linux-foundation.org>
To: Andi Kleen <ak@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>, Indan Zupancic <indan@nul.nu>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Andrey Borzenkov <arvidjaar@mail.ru>,
linux-kernel@vger.kernel.org, Bernhard Walle <bwalle@suse.de>
Subject: Re: [PATCH] x86: fix section mismatch warnings in mtrr
Date: Sun, 27 May 2007 10:57:18 -0700 [thread overview]
Message-ID: <20070527105718.19e1198d.akpm@linux-foundation.org> (raw)
In-Reply-To: <200705271156.22098.ak@suse.de>
On Sun, 27 May 2007 11:56:21 +0200 Andi Kleen <ak@suse.de> wrote:
>
> >
> > So section mismatch warnings are more about catching sloopy usage of __init than it is to
> > catch potential kernel oopesen. But the latter is a nice side effect that is appreciated.
>
> My point was that I cannot recall a single real oops bug found by the compile
> time checking.
There are quite a few of these fixes where you look at it and wonder "ytf
did the kernel ever work"? I suspect that it's partly a case of the code
reading random junk from where a flag used to be and continuing to work.
CONFIG_DEBUG_PAGEALLOC would have caught it.
Also, simply lack of testing coverage: few people have the correct
hardware, the correct config options and then go and do an rmmod+insmod.
Even fewer do a CPU hotplug. Fewer still do a memory hotplug.
But there are a lot of fixes, and a lot of warnings, and they are real bugs.
> We had a few in the past, but since we poison init data after boot they all tended
> to be found quickly anyways.
Sometimes. But a common pattern is "discover something at boot time and
save it away for later boot-time code". The storage gets marked __fooinit
and then it turns out that some non-boot-time initialisation code is using
it.
> But the warnings just seem to require endless changes and bogus changes
> (randomly moving code which was actually ok because it only called
> in the init case).
That would be a false positive. We do need the various tools to suppress
those so that we can find new bugs as they turn up.
You're right that it's all a complete pain. But the fault doesn't lie with
the checking code, IMO. It's just that the whole initdata thing is hard to
get right. All this fuss for a couple hundred kbytes - any sane
organisation would have killed the whole thing years ago ;)
It'll really get to be fun when some smarty writes us a "non __init symbol
referred to only from __init code" checker.
next prev parent reply other threads:[~2007-05-27 17:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-19 10:43 2.6.22-rc2: section mismatch Andrey Borzenkov
2007-05-19 11:00 ` Michal Piotrowski
2007-05-19 11:25 ` Andrey Borzenkov
2007-05-19 13:30 ` Indan Zupancic
2007-05-19 13:27 ` Sam Ravnborg
2007-05-19 13:32 ` [PATCH] x86: fix section mismatch warnings in mtrr Sam Ravnborg
2007-05-19 13:55 ` Andi Kleen
2007-05-19 14:09 ` Sam Ravnborg
2007-05-21 13:39 ` Jeremy Fitzhardinge
2007-05-21 13:48 ` Sam Ravnborg
2007-05-21 13:50 ` Sam Ravnborg
2007-05-21 13:52 ` Jeremy Fitzhardinge
2007-05-21 15:11 ` Sam Ravnborg
2007-05-26 12:07 ` Indan Zupancic
2007-05-26 16:02 ` Andi Kleen
2007-05-27 9:05 ` Sam Ravnborg
2007-05-27 9:56 ` Andi Kleen
2007-05-27 17:57 ` Andrew Morton [this message]
2007-05-28 20:04 ` Sam Ravnborg
2007-05-27 11:39 ` Andi Kleen
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=20070527105718.19e1198d.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=ak@suse.de \
--cc=arvidjaar@mail.ru \
--cc=bwalle@suse.de \
--cc=indan@nul.nu \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.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
all inboxes | Powered by JetHome®