From: Sam Ravnborg <sam@ravnborg.org>
To: Andi Kleen <ak@suse.de>
Cc: 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>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] x86: fix section mismatch warnings in mtrr
Date: Sun, 27 May 2007 11:05:42 +0200 [thread overview]
Message-ID: <20070527090542.GA18399@uranus.ravnborg.org> (raw)
In-Reply-To: <200705261802.08573.ak@suse.de>
On Sat, May 26, 2007 at 06:02:08PM +0200, Andi Kleen wrote:
> On Saturday 26 May 2007 14:07:24 Indan Zupancic wrote:
>
> >
> > Did the patches reach 2.6.22-rc3 yet?
>
> No.
>
> >
> > If they did, then the following warnings might need fixing:
>
> There is already one patch queued for it. But actually in my experience I cannot
> remember a single real bug showed by these warnings. All were false positives
> and there are always more of them.
>
> Maybe it would be best to disable these warnings again; not much good
> seems to come from them.
We recently had one bug releated to cpu* functions that was caused by wrong
section handling.
The whole purpose with __init and friends are the possibility to drop
the .init.text (+ .init.data) section when the kernel is up and running.
So if we have:
void __init deep_init()
{
not_so_deep_init();
}
void not_so_deep_init()
{
not_deep_init();
}
void __init not_deep_init()
{
...;
}
Then without the warnings we would never drop not_so_deep_init().
So the warnigns serve two purposes:
1) highlight places where something ought to be marked __init but is not done so.
2) highlight places where we have a potential dangerous reference from .text to .init.text
While proposng to drop the warnings people refer to case: 2) and totally forbet about case 1).
For the actual case with mtrr we had a situation where we merged two patches.
So one was the right fix but the next was the wrong fix. So we ended up with some inconsistent
code which we were lucky that the build pointed out so we could get it fixed.
My objective is to kill all false positives 2.6.23 and that is doable.
There are some tricky thing to address in non x86 architectures - like a pending issue in sparc64
for instance.
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.
Sam
next prev parent reply other threads:[~2007-05-27 9:04 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 [this message]
2007-05-27 9:56 ` Andi Kleen
2007-05-27 17:57 ` Andrew Morton
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=20070527090542.GA18399@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=arvidjaar@mail.ru \
--cc=bwalle@suse.de \
--cc=indan@nul.nu \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.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®