LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* 2.6.21-rc4-mm1 + 3 hot-fixes -- WARNING: could not find versions for .tmp_versions/built-in.mod
@ 2007-03-20 14:35 Miles Lane
2007-03-20 16:11 ` Andrew Morton
2007-03-20 21:27 ` Sam Ravnborg
0 siblings, 2 replies; 7+ messages in thread
From: Miles Lane @ 2007-03-20 14:35 UTC (permalink / raw)
To: Andrew Morton, LKML
It looks like the number of section mismatches is much reduced, which
is great. But, I don't remember seeing "WARNING: could not find
versions for ..." warnings before. Is this an artifact of the
init/.missing_syscalls.h problem I encountered earlier?
MODPOST vmlinux
WARNING: could not find versions for .tmp_versions/head.mod
WARNING: could not find versions for .tmp_versions/init_task.mod
WARNING: init/built-in.o - Section mismatch: reference to .init.text:
from .text between 'rest_init' (at offset 0x101) and 'try_name'
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: mm/built-in.o - Section mismatch: reference to
.init.text:__alloc_bootmem_node from .text between 'sparse_init' (at
offset 0x15c8f) and '__section_nr'
WARNING: mm/built-in.o - Section mismatch: reference to
.init.text:__alloc_bootmem_node from .text between 'sparse_init' (at
offset 0x15d02) and '__section_nr'
WARNING: mm/built-in.o - Section mismatch: reference to
.init.data:initkmem_list3 from .text between 'set_up_list3s' (at
offset 0x18c32) and 's_start'
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
WARNING: could not find versions for .tmp_versions/built-in.mod
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.21-rc4-mm1 + 3 hot-fixes -- WARNING: could not find versions for .tmp_versions/built-in.mod
2007-03-20 14:35 2.6.21-rc4-mm1 + 3 hot-fixes -- WARNING: could not find versions for .tmp_versions/built-in.mod Miles Lane
@ 2007-03-20 16:11 ` Andrew Morton
2007-03-20 20:35 ` Sam Ravnborg
2007-03-20 21:27 ` Sam Ravnborg
1 sibling, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2007-03-20 16:11 UTC (permalink / raw)
To: Miles Lane; +Cc: LKML
On Tue, 20 Mar 2007 07:35:06 -0700 "Miles Lane" <miles.lane@gmail.com> wrote:
> It looks like the number of section mismatches is much reduced, which
> is great.
We fixed something? Maybe we just broke the checker ;)
> But, I don't remember seeing "WARNING: could not find
> versions for ..." warnings before. Is this an artifact of the
> init/.missing_syscalls.h problem I encountered earlier?
Sam says these are harmless and he's working on making them go away.
> MODPOST vmlinux
> WARNING: could not find versions for .tmp_versions/head.mod
> WARNING: could not find versions for .tmp_versions/init_task.mod
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.21-rc4-mm1 + 3 hot-fixes -- WARNING: could not find versions for .tmp_versions/built-in.mod
2007-03-20 16:11 ` Andrew Morton
@ 2007-03-20 20:35 ` Sam Ravnborg
0 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2007-03-20 20:35 UTC (permalink / raw)
To: Andrew Morton; +Cc: Miles Lane, LKML
On Tue, Mar 20, 2007 at 08:11:38AM -0800, Andrew Morton wrote:
> On Tue, 20 Mar 2007 07:35:06 -0700 "Miles Lane" <miles.lane@gmail.com> wrote:
>
> > It looks like the number of section mismatches is much reduced, which
> > is great.
>
> We fixed something? Maybe we just broke the checker ;)
>
> > But, I don't remember seeing "WARNING: could not find
> > versions for ..." warnings before. Is this an artifact of the
> > init/.missing_syscalls.h problem I encountered earlier?
>
> Sam says these are harmless and he's working on making them go away.
>
> > MODPOST vmlinux
> > WARNING: could not find versions for .tmp_versions/head.mod
> > WARNING: could not find versions for .tmp_versions/init_task.mod
They were caused by modpost now being called with several .o files
that are not modules. The fix was just to get rid of the
warning.
I have committed the following to kbuild.git.
Sam
commit 84b48a0275b4474587cefecb455372e8df6dabda
Author: Sam Ravnborg <sam@ravnborg.org>
Date: Tue Mar 20 21:30:23 2007 +0100
kbuild: do not emit src version warning for non-modules
modpost is now called with .o files that are not modules.
So do not warn if there is no corresponding .mod
file listing .o files (in .tmp_versions/).
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c
index 8a28756..6873d5a 100644
--- a/scripts/mod/sumversion.c
+++ b/scripts/mod/sumversion.c
@@ -397,10 +397,9 @@ void get_src_version(const char *modname, char sum[], unsigned sumlen)
(int) strlen(basename) - 2, basename);
file = grab_file(filelist, &len);
- if (!file) {
- warn("could not find versions for %s\n", filelist);
+ if (!file)
+ /* not a module or .mod file missing - ignore */
return;
- }
sources = strchr(file, '\n');
if (!sources) {
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.21-rc4-mm1 + 3 hot-fixes -- WARNING: could not find versions for .tmp_versions/built-in.mod
2007-03-20 14:35 2.6.21-rc4-mm1 + 3 hot-fixes -- WARNING: could not find versions for .tmp_versions/built-in.mod Miles Lane
2007-03-20 16:11 ` Andrew Morton
@ 2007-03-20 21:27 ` Sam Ravnborg
2007-03-23 12:54 ` Yasunori Goto
1 sibling, 1 reply; 7+ messages in thread
From: Sam Ravnborg @ 2007-03-20 21:27 UTC (permalink / raw)
To: Miles Lane; +Cc: Andrew Morton, LKML
On Tue, Mar 20, 2007 at 07:35:06AM -0700, Miles Lane wrote:
> It looks like the number of section mismatches is much reduced, which
> is great. But, I don't remember seeing "WARNING: could not find
> versions for ..." warnings before. Is this an artifact of the
> init/.missing_syscalls.h problem I encountered earlier?
>
> MODPOST vmlinux
> WARNING: could not find versions for .tmp_versions/head.mod
> WARNING: could not find versions for .tmp_versions/init_task.mod
> WARNING: init/built-in.o - Section mismatch: reference to .init.text:
> from .text between 'rest_init' (at offset 0x101) and 'try_name'
I do not see this one - but then I do not build the -mm tree.
Will chase it later if no-one beats me.
> WARNING: could not find versions for .tmp_versions/built-in.mod
> WARNING: could not find versions for .tmp_versions/built-in.mod
> WARNING: could not find versions for .tmp_versions/built-in.mod
> WARNING: could not find versions for .tmp_versions/built-in.mod
> WARNING: could not find versions for .tmp_versions/built-in.mod
> WARNING: could not find versions for .tmp_versions/built-in.mod
> WARNING: mm/built-in.o - Section mismatch: reference to
> .init.text:__alloc_bootmem_node from .text between 'sparse_init' (at
> offset 0x15c8f) and '__section_nr'
I took a look at this one.
You have SPARSEMEM enabled in your config.
And then I see that in sparse.c we call alloc_bootmem_node()
from a function I thought should be marked __devinit (it
is used by memory_hotplug.c).
But I am not familiar enough to judge if __alloc_bootmen_node
are marked correct with __init or __devinit (to say
this is used in the HOTPLUG case) is more correct.
Anyone?
> WARNING: mm/built-in.o - Section mismatch: reference to
> .init.text:__alloc_bootmem_node from .text between 'sparse_init' (at
> offset 0x15d02) and '__section_nr'
Same as above....
> WARNING: mm/built-in.o - Section mismatch: reference to
> .init.data:initkmem_list3 from .text between 'set_up_list3s' (at
> offset 0x18c32) and 's_start'
This one I have also tried to track down. But my
slab knowledge was not enough to fix it :-(
Sam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.21-rc4-mm1 + 3 hot-fixes -- WARNING: could not find versions for .tmp_versions/built-in.mod
2007-03-20 21:27 ` Sam Ravnborg
@ 2007-03-23 12:54 ` Yasunori Goto
2007-03-23 16:19 ` Sam Ravnborg
0 siblings, 1 reply; 7+ messages in thread
From: Yasunori Goto @ 2007-03-23 12:54 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Miles Lane, Andrew Morton, LKML
Hello.
> > WARNING: mm/built-in.o - Section mismatch: reference to
> > .init.text:__alloc_bootmem_node from .text between 'sparse_init' (at
> > offset 0x15c8f) and '__section_nr'
> I took a look at this one.
> You have SPARSEMEM enabled in your config.
> And then I see that in sparse.c we call alloc_bootmem_node()
> from a function I thought should be marked __devinit (it
> is used by memory_hotplug.c).
> But I am not familiar enough to judge if __alloc_bootmen_node
> are marked correct with __init or __devinit (to say
> this is used in the HOTPLUG case) is more correct.
> Anyone?
>
> > WARNING: mm/built-in.o - Section mismatch: reference to
> > .init.text:__alloc_bootmem_node from .text between 'sparse_init' (at
> > offset 0x15d02) and '__section_nr'
> Same as above....
Memory hotplug code has __meminit for its purpose.
But, I suspect that many other places of memory hotplug code may have
same issue. I will chase them.
BTW, does -mm code checks more strict than stock kernel? I can't see
these warnings in 2.6.21-rc4.....
Bye.
--
Yasunori Goto
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.21-rc4-mm1 + 3 hot-fixes -- WARNING: could not find versions for .tmp_versions/built-in.mod
2007-03-23 12:54 ` Yasunori Goto
@ 2007-03-23 16:19 ` Sam Ravnborg
2007-03-29 5:17 ` [RFC:PATCH]regster memory init functions into white list of section mismatch Yasunori Goto
0 siblings, 1 reply; 7+ messages in thread
From: Sam Ravnborg @ 2007-03-23 16:19 UTC (permalink / raw)
To: Yasunori Goto; +Cc: Miles Lane, Andrew Morton, LKML
On Fri, Mar 23, 2007 at 09:54:29PM +0900, Yasunori Goto wrote:
> Hello.
>
> > > WARNING: mm/built-in.o - Section mismatch: reference to
> > > .init.text:__alloc_bootmem_node from .text between 'sparse_init' (at
> > > offset 0x15c8f) and '__section_nr'
> > I took a look at this one.
> > You have SPARSEMEM enabled in your config.
> > And then I see that in sparse.c we call alloc_bootmem_node()
> > from a function I thought should be marked __devinit (it
> > is used by memory_hotplug.c).
> > But I am not familiar enough to judge if __alloc_bootmen_node
> > are marked correct with __init or __devinit (to say
> > this is used in the HOTPLUG case) is more correct.
> > Anyone?
> >
> > > WARNING: mm/built-in.o - Section mismatch: reference to
> > > .init.text:__alloc_bootmem_node from .text between 'sparse_init' (at
> > > offset 0x15d02) and '__section_nr'
> > Same as above....
>
> Memory hotplug code has __meminit for its purpose.
> But, I suspect that many other places of memory hotplug code may have
> same issue. I will chase them.
Thanks!
>
> BTW, does -mm code checks more strict than stock kernel? I can't see
> these warnings in 2.6.21-rc4.....
Yes it does. The included kbuild changes enables proper check of
symbols in vmlinux.
Sam
^ permalink raw reply [flat|nested] 7+ messages in thread
* [RFC:PATCH]regster memory init functions into white list of section mismatch.
2007-03-23 16:19 ` Sam Ravnborg
@ 2007-03-29 5:17 ` Yasunori Goto
0 siblings, 0 replies; 7+ messages in thread
From: Yasunori Goto @ 2007-03-29 5:17 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Miles Lane, Andrew Morton, LKML
> > > > WARNING: mm/built-in.o - Section mismatch: reference to
> > > > .init.text:__alloc_bootmem_node from .text between 'sparse_init' (at
> > > > offset 0x15c8f) and '__section_nr'
> > > I took a look at this one.
> > > You have SPARSEMEM enabled in your config.
> > > And then I see that in sparse.c we call alloc_bootmem_node()
> > > from a function I thought should be marked __devinit (it
> > > is used by memory_hotplug.c).
> > > But I am not familiar enough to judge if __alloc_bootmen_node
> > > are marked correct with __init or __devinit (to say
> > > this is used in the HOTPLUG case) is more correct.
> > > Anyone?
> > >
> > > > WARNING: mm/built-in.o - Section mismatch: reference to
> > > > .init.text:__alloc_bootmem_node from .text between 'sparse_init' (at
> > > > offset 0x15d02) and '__section_nr'
> > > Same as above....
> >
> > Memory hotplug code has __meminit for its purpose.
> > But, I suspect that many other places of memory hotplug code may have
> > same issue. I will chase them.
Hello.
I chased section mismatch codes on memory hotplug code. Many of
them should be defined as __meminit. (This check was great helpful
for checking it. Thanks!)
But, I would like to add a new pattern in white list for some of
them. (I'll post another patch for others.)
sparse.c (sparse_index_alloc()) calles alloc_bootmem_node() as you mentioned.
And, zone_wait_table_init() calles it too.
These functions call it on only boot time, and call
vmalloc()/kmalloc() on hotplug time. It is distinguished by
system_state value or slab_is_available(). Just refrerences remain
at them after boot.
Bootmem allocation functions are called by many functions and it must be
used only at boot time. I think __init of them should keep for
section mismatch check. So, I would like to register sparse_index_alloc()
and zone_wait_table_init() into white list.
Please comment. If there is a more good way, please let me know...
Thanks.
P.S.
Pattarn 10 is for ia64 (not for memory hotplug).
ia64's .machvec section is mixture table of .init functions and normal text.
It is defined for platform dependent functions. This is also cause of
warnings. I think this should be registered too.
Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
---
mm/page_alloc.c | 2 +-
mm/sparse.c | 2 +-
scripts/mod/modpost.c | 29 +++++++++++++++++++++++++++++
3 files changed, 31 insertions(+), 2 deletions(-)
Index: current_test/scripts/mod/modpost.c
===================================================================
--- current_test.orig/scripts/mod/modpost.c 2007-03-27 20:21:20.000000000 +0900
+++ current_test/scripts/mod/modpost.c 2007-03-29 14:16:05.000000000 +0900
@@ -643,6 +643,17 @@ static int strrcmp(const char *s, const
* The pattern is:
* tosec = .init.text
* fromsec = __ksymtab*
+ *
+ * Pattern 9:
+ * Some of functions are common code between boot time and hotplug
+ * time. The bootmem allocater is called only boot time in its
+ * functions. So it's ok to reference.
+ * tosec = .init.text
+ *
+ * Pattern 10:
+ * ia64 has machvec table for each platform. It is mixture of function
+ * pointer of .init.text and .text.
+ * fromsec = .machvec
**/
static int secref_whitelist(const char *modname, const char *tosec,
const char *fromsec, const char *atsym,
@@ -669,6 +680,12 @@ static int secref_whitelist(const char *
NULL
};
+ const char *pat4sym[] = {
+ "sparse_index_alloc",
+ "zone_wait_table_init",
+ NULL
+ };
+
/* Check for pattern 1 */
if (strcmp(tosec, ".init.data") != 0)
f1 = 0;
@@ -725,6 +742,18 @@ static int secref_whitelist(const char *
if ((strcmp(tosec, ".init.text") == 0) &&
(strncmp(fromsec, "__ksymtab", strlen("__ksymtab")) == 0))
return 1;
+
+ /* Check for pattern 9 */
+ if ((strcmp(tosec, ".init.text") == 0) &&
+ (strcmp(fromsec, ".text") == 0))
+ for (s = pat4sym; *s; s++)
+ if (strcmp(atsym, *s) == 0)
+ return 1;
+
+ /* Check for pattern 10 */
+ if (strcmp(fromsec, ".machvec") == 0)
+ return 1;
+
return 0;
}
Index: current_test/mm/page_alloc.c
===================================================================
--- current_test.orig/mm/page_alloc.c 2007-03-27 16:04:41.000000000 +0900
+++ current_test/mm/page_alloc.c 2007-03-29 14:14:42.000000000 +0900
@@ -2673,7 +2673,7 @@ void __init setup_per_cpu_pageset(void)
#endif
-static __meminit
+static __meminit noinline
int zone_wait_table_init(struct zone *zone, unsigned long zone_size_pages)
{
int i;
Index: current_test/mm/sparse.c
===================================================================
--- current_test.orig/mm/sparse.c 2007-03-27 16:04:41.000000000 +0900
+++ current_test/mm/sparse.c 2007-03-29 14:15:00.000000000 +0900
@@ -44,7 +44,7 @@ EXPORT_SYMBOL(page_to_nid);
#endif
#ifdef CONFIG_SPARSEMEM_EXTREME
-static struct mem_section *sparse_index_alloc(int nid)
+static struct mem_section noinline *sparse_index_alloc(int nid)
{
struct mem_section *section = NULL;
unsigned long array_size = SECTIONS_PER_ROOT *
--
Yasunori Goto
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-03-29 5:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-20 14:35 2.6.21-rc4-mm1 + 3 hot-fixes -- WARNING: could not find versions for .tmp_versions/built-in.mod Miles Lane
2007-03-20 16:11 ` Andrew Morton
2007-03-20 20:35 ` Sam Ravnborg
2007-03-20 21:27 ` Sam Ravnborg
2007-03-23 12:54 ` Yasunori Goto
2007-03-23 16:19 ` Sam Ravnborg
2007-03-29 5:17 ` [RFC:PATCH]regster memory init functions into white list of section mismatch Yasunori Goto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).