* section mismatches (scsi e.g.)
@ 2006-04-14 16:29 Randy.Dunlap
2006-04-14 16:50 ` James Bottomley
2006-04-14 16:52 ` Sam Ravnborg
0 siblings, 2 replies; 7+ messages in thread
From: Randy.Dunlap @ 2006-04-14 16:29 UTC (permalink / raw)
To: sam; +Cc: scsi
Hi Sam,
I was looking at these warnings (on 2.6.17-rc1-git8):
WARNING: drivers/scsi/3w-9xxx.o - Section mismatch: reference to .init.data: from .data between 'twa_driver' (at offset 0x18) and 'twa_error_table'
WARNING: drivers/scsi/3w-xxxx.o - Section mismatch: reference to .init.data: from .data between 'tw_driver' (at offset 0x18) and 'tw_sense_table'
WARNING: drivers/scsi/gdth.o - Section mismatch: reference to .init.text:gdth_detect from .data between 'driver_template' (at offset 0x270) and 'async_cache_tab'
I either don't see a problem or I'm having trouble reading/decoding
the warning messages. Could you look at these 3 sometime?
Must have CONFIG_HOTPLUG=n ...
---
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: section mismatches (scsi e.g.)
2006-04-14 16:29 section mismatches (scsi e.g.) Randy.Dunlap
@ 2006-04-14 16:50 ` James Bottomley
2006-04-14 16:53 ` Sam Ravnborg
2006-04-14 16:52 ` Sam Ravnborg
1 sibling, 1 reply; 7+ messages in thread
From: James Bottomley @ 2006-04-14 16:50 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: sam, scsi
On Fri, 2006-04-14 at 09:29 -0700, Randy.Dunlap wrote:
> WARNING: drivers/scsi/3w-9xxx.o - Section mismatch: reference to .init.data: from .data between 'twa_driver' (at offset 0x18) and 'twa_error_table'
> WARNING: drivers/scsi/3w-xxxx.o - Section mismatch: reference to .init.data: from .data between 'tw_driver' (at offset 0x18) and 'tw_sense_table'
> WARNING: drivers/scsi/gdth.o - Section mismatch: reference to .init.text:gdth_detect from .data between 'driver_template' (at offset 0x270) and 'async_cache_tab'
>
> I either don't see a problem or I'm having trouble reading/decoding
> the warning messages. Could you look at these 3 sometime?
These seem to have been turning up all over the tree. The only common
feature seems to be that if you re-run the build, they don't show up
again.
James
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: section mismatches (scsi e.g.)
2006-04-14 16:29 section mismatches (scsi e.g.) Randy.Dunlap
2006-04-14 16:50 ` James Bottomley
@ 2006-04-14 16:52 ` Sam Ravnborg
2006-04-14 18:27 ` Randy.Dunlap
2006-04-14 19:25 ` Randy.Dunlap
1 sibling, 2 replies; 7+ messages in thread
From: Sam Ravnborg @ 2006-04-14 16:52 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: scsi
On Fri, Apr 14, 2006 at 09:29:11AM -0700, Randy.Dunlap wrote:
> Hi Sam,
>
> I was looking at these warnings (on 2.6.17-rc1-git8):
>
> WARNING: drivers/scsi/3w-9xxx.o - Section mismatch: reference to .init.data: from .data between 'twa_driver' (at offset 0x18) and 'twa_error_table'
> WARNING: drivers/scsi/3w-xxxx.o - Section mismatch: reference to .init.data: from .data between 'tw_driver' (at offset 0x18) and 'tw_sense_table'
> WARNING: drivers/scsi/gdth.o - Section mismatch: reference to .init.text:gdth_detect from .data between 'driver_template' (at offset 0x270) and 'async_cache_tab'
>
> I either don't see a problem or I'm having trouble reading/decoding
> the warning messages. Could you look at these 3 sometime?
> WARNING: drivers/scsi/3w-9xxx.o
twa_driver contains a reference to twa_pci_tbl which is marked
devinitdata.
Darren Jenkins already pointed this pattern out but somehow I lost
the patch (not applied).
It is here:
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 0b92ddf..81448e5 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -492,7 +492,7 @@ static int strrcmp(const char *s, const
* These functions may often be marked __init and we do not want to
* warn here.
* the pattern is identified by:
- * tosec = .init.text | .exit.text
+ * tosec = .init.text | .exit.text | .init.data
* fromsec = .data
* atsym = *_driver, *_ops, *_probe, *probe_one
**/
@@ -522,7 +522,8 @@ static int secref_whitelist(const char *
/* Check for pattern 2 */
if ((strcmp(tosec, ".init.text") != 0) &&
- (strcmp(tosec, ".exit.text") != 0))
+ (strcmp(tosec, ".exit.text") != 0) &&
+ (strcmp(tosec, ".init.data") != 0))
f2 = 0;
if (strcmp(fromsec, ".data") != 0)
f2 = 0;
> WARNING: drivers/scsi/3w-xxxx.o
Same issue as above.
> WARNING: drivers/scsi/gdth.o
>From modpost.c:
* Pattern 2:
* Many drivers utilise a *_driver container with references to
* add, remove, probe functions etc.
* These functions may often be marked __init and we do not want to
* warn here.
* the pattern is identified by:
* tosec = .init.text | .exit.text
* fromsec = .data
* atsym = *_driver, *_ops, *_probe, *probe_one
**/
Shall we include *_template in this list?
The most common name seems to be the ambigous driver_template.
Some scsi drievers has been a bit more specific and used
<driver>_template.
In total 76 drivers.
16 drivers uses: *_sht for their scsi_host_template variables.
And one uses NCR_Q720_tpnt.
I will push the 'lost' patch later today.
Sam
>
> Must have CONFIG_HOTPLUG=n ...
>
> ---
> ~Randy
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: section mismatches (scsi e.g.)
2006-04-14 16:50 ` James Bottomley
@ 2006-04-14 16:53 ` Sam Ravnborg
0 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2006-04-14 16:53 UTC (permalink / raw)
To: James Bottomley; +Cc: Randy.Dunlap, scsi
On Fri, Apr 14, 2006 at 11:50:15AM -0500, James Bottomley wrote:
> On Fri, 2006-04-14 at 09:29 -0700, Randy.Dunlap wrote:
> > WARNING: drivers/scsi/3w-9xxx.o - Section mismatch: reference to .init.data: from .data between 'twa_driver' (at offset 0x18) and 'twa_error_table'
> > WARNING: drivers/scsi/3w-xxxx.o - Section mismatch: reference to .init.data: from .data between 'tw_driver' (at offset 0x18) and 'tw_sense_table'
> > WARNING: drivers/scsi/gdth.o - Section mismatch: reference to .init.text:gdth_detect from .data between 'driver_template' (at offset 0x270) and 'async_cache_tab'
> >
> > I either don't see a problem or I'm having trouble reading/decoding
> > the warning messages. Could you look at these 3 sometime?
>
> These seem to have been turning up all over the tree. The only common
> feature seems to be that if you re-run the build, they don't show up
> again.
I really hope this is not true. The reporting ought to be conistent.
If you can give me something reproduceable then I will try to hunt it
down.
Sam
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: section mismatches (scsi e.g.)
2006-04-14 16:52 ` Sam Ravnborg
@ 2006-04-14 18:27 ` Randy.Dunlap
2006-04-14 19:25 ` Randy.Dunlap
1 sibling, 0 replies; 7+ messages in thread
From: Randy.Dunlap @ 2006-04-14 18:27 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-scsi
On Fri, 14 Apr 2006 18:52:10 +0200 Sam Ravnborg wrote:
> On Fri, Apr 14, 2006 at 09:29:11AM -0700, Randy.Dunlap wrote:
> > Hi Sam,
> >
> > I was looking at these warnings (on 2.6.17-rc1-git8):
> >
> > WARNING: drivers/scsi/3w-9xxx.o - Section mismatch: reference to .init.data: from .data between 'twa_driver' (at offset 0x18) and 'twa_error_table'
> > WARNING: drivers/scsi/3w-xxxx.o - Section mismatch: reference to .init.data: from .data between 'tw_driver' (at offset 0x18) and 'tw_sense_table'
> > WARNING: drivers/scsi/gdth.o - Section mismatch: reference to .init.text:gdth_detect from .data between 'driver_template' (at offset 0x270) and 'async_cache_tab'
> >
> > I either don't see a problem or I'm having trouble reading/decoding
> > the warning messages. Could you look at these 3 sometime?
>
> > WARNING: drivers/scsi/3w-9xxx.o
> twa_driver contains a reference to twa_pci_tbl which is marked
> devinitdata.
>
> Darren Jenkins already pointed this pattern out but somehow I lost
> the patch (not applied).
> It is here:
[snip]
> > WARNING: drivers/scsi/gdth.o
> >From modpost.c:
> * Pattern 2:
> * Many drivers utilise a *_driver container with references to
> * add, remove, probe functions etc.
> * These functions may often be marked __init and we do not want to
> * warn here.
> * the pattern is identified by:
> * tosec = .init.text | .exit.text
> * fromsec = .data
> * atsym = *_driver, *_ops, *_probe, *probe_one
> **/
>
> Shall we include *_template in this list?
I would say yes.
> The most common name seems to be the ambigous driver_template.
> Some scsi drievers has been a bit more specific and used
> <driver>_template.
> In total 76 drivers.
>
> 16 drivers uses: *_sht for their scsi_host_template variables.
> And one uses NCR_Q720_tpnt.
>
> I will push the 'lost' patch later today.
+ I don't see the inconsistencies that James mentioned.
Thanks.
---
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: section mismatches (scsi e.g.)
2006-04-14 16:52 ` Sam Ravnborg
2006-04-14 18:27 ` Randy.Dunlap
@ 2006-04-14 19:25 ` Randy.Dunlap
2006-04-14 21:21 ` Sam Ravnborg
1 sibling, 1 reply; 7+ messages in thread
From: Randy.Dunlap @ 2006-04-14 19:25 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-scsi
On Fri, 14 Apr 2006 18:52:10 +0200 Sam Ravnborg wrote:
> On Fri, Apr 14, 2006 at 09:29:11AM -0700, Randy.Dunlap wrote:
> > Hi Sam,
> >
> > I was looking at these warnings (on 2.6.17-rc1-git8):
> >
[snip]
> Darren Jenkins already pointed this pattern out but somehow I lost
> the patch (not applied).
> It is here:
OK, I applied the patch. Now please consider these (that I doubt):
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x0)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x8)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x10)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x18)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x20)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x28)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x30)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x38)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x40)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x48)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x50)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x58)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x60)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x68)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x70)
WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x78)
Any ideas?
---
~Randy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: section mismatches (scsi e.g.)
2006-04-14 19:25 ` Randy.Dunlap
@ 2006-04-14 21:21 ` Sam Ravnborg
0 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2006-04-14 21:21 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: linux-scsi
On Fri, Apr 14, 2006 at 12:25:20PM -0700, Randy.Dunlap wrote:
> On Fri, 14 Apr 2006 18:52:10 +0200 Sam Ravnborg wrote:
>
> > On Fri, Apr 14, 2006 at 09:29:11AM -0700, Randy.Dunlap wrote:
> > > Hi Sam,
> > >
> > > I was looking at these warnings (on 2.6.17-rc1-git8):
> > >
> [snip]
>
> > Darren Jenkins already pointed this pattern out but somehow I lost
> > the patch (not applied).
> > It is here:
>
> OK, I applied the patch. Now please consider these (that I doubt):
>
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x0)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x8)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x10)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x18)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x20)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x28)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x30)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x38)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x40)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x48)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x50)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x58)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x60)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x68)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x70)
> WARNING: drivers/scsi/sd_mod.o - Section mismatch: reference to .exit.text: from .rodata after '' (at offset 0x78)
>
> Any ideas?
For .init.text the following was explained:
* Identify sections from which references to a .init section is OK.
*
* Unfortunately references to read only data that referenced .init
* sections had to be excluded. Almost all of these are false
* positives, they are created by gcc. The downside of excluding
* rodata
* is that there really are some user references from rodata to
* init code, e.g. drivers/video/vgacon.c:
So ignoring .rodata in exit_section_ref_ok() seems to be the solution
here.
So we end up with following patch.
Sam
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 7e8079a..93a043e 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -492,7 +492,7 @@ static int strrcmp(const char *s, const
* These functions may often be marked __init and we do not want to
* warn here.
* the pattern is identified by:
- * tosec = .init.text | .exit.text
+ * tosec = .init.text | .exit.text | .init.data
* fromsec = .data
* atsym = *_driver, *_ops, *_probe, *probe_one
**/
@@ -522,7 +522,8 @@ static int secref_whitelist(const char *
/* Check for pattern 2 */
if ((strcmp(tosec, ".init.text") != 0) &&
- (strcmp(tosec, ".exit.text") != 0))
+ (strcmp(tosec, ".exit.text") != 0) &&
+ (strcmp(tosec, ".init.data") != 0))
f2 = 0;
if (strcmp(fromsec, ".data") != 0)
f2 = 0;
@@ -820,6 +821,7 @@ static int exit_section(const char *name
* For our future {in}sanity, add a comment that this is the ppc .opd
* section, not the ia64 .opd section.
* ia64 .opd should not point to discarded sections.
+ * [.rodata] like for .init.text we ignore .rodata references -same reason
**/
static int exit_section_ref_ok(const char *name)
{
@@ -829,6 +831,7 @@ static int exit_section_ref_ok(const cha
".exit.text",
".exit.data",
".init.text",
+ ".rodata",
".opd", /* See comment [OPD] */
".toc1", /* used by ppc64 */
".altinstructions",
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-04-14 21:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-14 16:29 section mismatches (scsi e.g.) Randy.Dunlap
2006-04-14 16:50 ` James Bottomley
2006-04-14 16:53 ` Sam Ravnborg
2006-04-14 16:52 ` Sam Ravnborg
2006-04-14 18:27 ` Randy.Dunlap
2006-04-14 19:25 ` Randy.Dunlap
2006-04-14 21:21 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox