FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 03-29-2012, 05:47 AM
Tetsuo Handa
 
Default Section mismatch warnings

I noticed a section mismatch warning while building 3.2.0-20.33 for X86_32.

AR arch/x86/lib/lib.a
LD vmlinux.o
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x187833): Section mismatch in reference from the function load_elf_binary() to the variable .cpuinit.data:disable_nx
The function load_elf_binary() references
the variable __cpuinitdata disable_nx.
This is often because load_elf_binary lacks a __cpuinitdata
annotation or the annotation of disable_nx is wrong.

GEN .version
CHK include/generated/compile.h
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD vmlinux

The load_elf_binary() in question has

#ifdef CONFIG_X86_32
/*
* Turn off the CS limit completely if exec-shield disabled or
* NX active:
*/
if (disable_nx || executable_stack != EXSTACK_DISABLE_X || (__supported_pte_mask & _PAGE_NX))
arch_add_exec_range(current->mm, -1);
#endif

As far as I know, Fedora 15/16 and Ubuntu 11.04/11.10/12.04 have this code but
they did not remove "__cpuinitdata" annotation when removing "static".

fedora-15/linux-2.6.42.12-1.fc15/arch/x86/mm/setup_nx.c:int disable_nx __cpuinitdata;
fedora-16/linux-3.3.0-4.fc16/arch/x86/mm/setup_nx.c:int disable_nx __cpuinitdata;
ubuntu-11.04/linux-2.6.38-13.57/arch/x86/mm/setup_nx.c:int disable_nx __cpuinitdata;
ubuntu-11.10/linux-3.0.0-17.30/arch/x86/mm/setup_nx.c:int disable_nx __cpuinitdata;
ubuntu-12.04/linux-3.2.0-20.33/arch/x86/mm/setup_nx.c:int disable_nx __cpuinitdata;

load_elf_binary() is definitely called after initialization.
Don't we need to remove __cpuinitdata annotation like
https://lkml.org/lkml/2006/12/13/300 ?



There are many similar warnings with this kernel build.
Maybe we should recheck.

MODPOST 3524 modules
WARNING: drivers/net/ethernet/3com/3c509.o(.data+0x1bc): Section mismatch in reference from the variable el3_eisa_driver to the function .init.text:el3_eisa_probe()
The variable el3_eisa_driver references
the function __init el3_eisa_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/3com/3c509.o(.data+0x1e0): Section mismatch in reference from the variable el3_mca_driver to the variable .init.data:el3_mca_adapter_ids
The variable el3_mca_driver references
the variable __initdata el3_mca_adapter_ids
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/3com/3c509.o(.data+0x204): Section mismatch in reference from the variable el3_mca_driver to the function .init.text:el3_mca_probe()
The variable el3_mca_driver references
the function __init el3_mca_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/3com/3c59x.o(.data+0xdc): Section mismatch in reference from the variable vortex_eisa_driver to the function .init.text:vortex_eisa_probe()
The variable vortex_eisa_driver references
the function __init vortex_eisa_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/8390/ne3210.o(.data+0x5c): Section mismatch in reference from the variable ne3210_eisa_driver to the function .init.text:ne3210_eisa_probe()
The variable ne3210_eisa_driver references
the function __init ne3210_eisa_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/8390/smc-mca.o(.data+0x0): Section mismatch in reference from the variable ultra_driver to the variable .init.data:smc_mca_adapter_ids
The variable ultra_driver references
the variable __initdata smc_mca_adapter_ids
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/8390/smc-mca.o(.data+0x24): Section mismatch in reference from the variable ultra_driver to the function .init.text:ultramca_probe()
The variable ultra_driver references
the function __init ultramca_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/amd/depca.o(.data+0x44): Section mismatch in reference from the variable depca_mca_driver to the function .init.text:depca_mca_probe()
The variable depca_mca_driver references
the function __init depca_mca_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/amd/depca.o(.data+0x9c): Section mismatch in reference from the variable depca_eisa_driver to the function .init.text:depca_eisa_probe()
The variable depca_eisa_driver references
the function __init depca_eisa_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/amd/depca.o(.devinit.text+0x1b): Section mismatch in reference from the function depca_isa_probe() to the function .init.text:depca_common_init()
The function __devinit depca_isa_probe() references
a function __init depca_common_init().
If depca_common_init is only used by depca_isa_probe then
annotate depca_common_init with a matching annotation.

WARNING: drivers/net/ethernet/amd/depca.o(.devinit.text+0x2e): Section mismatch in reference from the function depca_isa_probe() to the function .init.text:depca_shmem_probe()
The function __devinit depca_isa_probe() references
a function __init depca_shmem_probe().
If depca_shmem_probe is only used by depca_isa_probe then
annotate depca_shmem_probe with a matching annotation.

WARNING: drivers/net/ethernet/amd/depca.o(.devinit.text+0x65): Section mismatch in reference from the function depca_isa_probe() to the function .init.text:depca_hw_init()
The function __devinit depca_isa_probe() references
a function __init depca_hw_init().
If depca_hw_init is only used by depca_isa_probe then
annotate depca_hw_init with a matching annotation.

WARNING: drivers/net/ethernet/dec/tulip/de4x5.o(.data+0xbc): Section mismatch in reference from the variable de4x5_eisa_driver to the function .init.text:de4x5_eisa_probe()
The variable de4x5_eisa_driver references
the function __init de4x5_eisa_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/hp/hp100.o(.data+0x7c): Section mismatch in reference from the variable hp100_eisa_driver to the function .init.text:hp100_eisa_probe()
The variable hp100_eisa_driver references
the function __init hp100_eisa_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/ethernet/natsemi/ibmlana.o(.data+0x0): Section mismatch in reference from the variable ibmlana_driver to the variable .init.data:ibmlana_adapter_ids
The variable ibmlana_driver references
the variable __initdata ibmlana_adapter_ids
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/net/tokenring/madgemc.o(.data+0x0): Section mismatch in reference from the variable madgemc_driver to the variable .init.data:madgemc_adapter_ids
The variable madgemc_driver references
the variable __initdata madgemc_adapter_ids
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/scsi/NCR_Q720_mod.o(.data+0x24): Section mismatch in reference from the variable NCR_Q720_driver to the function .init.text:NCR_Q720_probe()
The variable NCR_Q720_driver references
the function __init NCR_Q720_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/scsi/sim710.o(.data+0x64): Section mismatch in reference from the variable sim710_mca_driver to the function .init.text:sim710_mca_probe()
The variable sim710_mca_driver references
the function __init sim710_mca_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/scsi/sim710.o(.data+0xbc): Section mismatch in reference from the variable sim710_eisa_driver to the function .init.text:sim710_eisa_probe()
The variable sim710_eisa_driver references
the function __init sim710_eisa_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: drivers/staging/comedi/drivers/s626.o(.text+0x236d): Section mismatch in reference from the function s626_attach() to the variable .devinit.rodata:s626_pci_table
The function s626_attach() references
the variable __devinitconst s626_pci_table.
This is often because s626_attach lacks a __devinitconst
annotation or the annotation of s626_pci_table is wrong.

WARNING: drivers/staging/comedi/drivers/s626.o(.text+0x2373): Section mismatch in reference from the function s626_attach() to the variable .devinit.rodata:s626_pci_table
The function s626_attach() references
the variable __devinitconst s626_pci_table.
This is often because s626_attach lacks a __devinitconst
annotation or the annotation of s626_pci_table is wrong.

WARNING: drivers/staging/comedi/drivers/s626.o(.text+0x2379): Section mismatch in reference from the function s626_attach() to the variable .devinit.rodata:s626_pci_table
The function s626_attach() references
the variable __devinitconst s626_pci_table.
This is often because s626_attach lacks a __devinitconst
annotation or the annotation of s626_pci_table is wrong.

WARNING: drivers/staging/comedi/drivers/s626.o(.text+0x2381): Section mismatch in reference from the function s626_attach() to the variable .devinit.rodata:s626_pci_table
The function s626_attach() references
the variable __devinitconst s626_pci_table.
This is often because s626_attach lacks a __devinitconst
annotation or the annotation of s626_pci_table is wrong.

WARNING: drivers/usb/gadget/g_ffs.o(.text+0x6c53): Section mismatch in reference from the function eth_bind_config() to the function .init.text:geth_bind_config()
The function eth_bind_config() references
the function __init geth_bind_config().
This is often because eth_bind_config lacks a __init
annotation or the annotation of geth_bind_config is wrong.

WARNING: drivers/video/vesafb.o(.exit.text+0x42): Section mismatch in reference from the function vesafb_remove() to the (unknown reference) .init.dataunknown)
The function __exit vesafb_remove() references
a (unknown reference) __initdata (unknown).
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __initdata annotation of
(unknown) so it may be used outside an init section.

WARNING: drivers/video/vesafb.o(.exit.text+0x4a): Section mismatch in reference from the function vesafb_remove() to the variable .init.data:vesafb_fix
The function __exit vesafb_remove() references
a variable __initdata vesafb_fix.
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __initdata annotation of
vesafb_fix so it may be used outside an init section.

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 03-29-2012, 01:25 PM
Tim Gardner
 
Default Section mismatch warnings

This is a multi-part message in MIME format.On 03/28/2012 11:47 PM, Tetsuo Handa wrote:
> load_elf_binary() is definitely called after initialization.

Good catch. This same issue also exists in older kernels where we've
applied the NX emulation patches.

http://bugs.launchpad.net/bugs/968233

rtg
--
Tim Gardner tim.gardner@canonical.com
 
Old 03-30-2012, 03:05 PM
Tetsuo Handa
 
Default Section mismatch warnings

Tim Gardner wrote:
> This is a multi-part message in MIME format.
>
> On 03/28/2012 11:47 PM, Tetsuo Handa wrote:
> > load_elf_binary() is definitely called after initialization.
>
> Good catch. This same issue also exists in older kernels where we've
> applied the NX emulation patches.

OK. Then, I think we also want to fix these warnings probably introduced by
commit a6021559 "UBUNTU: SAUCE: (no-up) Modularize vesafb".

WARNING: drivers/video/vesafb.o(.exit.text+0x42): Section mismatch in reference from the function vesafb_remove() to the (unknown reference) .init.dataunknown)
The function __exit vesafb_remove() references
a (unknown reference) __initdata (unknown).
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __initdata annotation of
(unknown) so it may be used outside an init section.

WARNING: drivers/video/vesafb.o(.exit.text+0x4a): Section mismatch in reference from the function vesafb_remove() to the variable .init.data:vesafb_fix
The function __exit vesafb_remove() references
a variable __initdata vesafb_fix.
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __initdata annotation of
vesafb_fix so it may be used outside an init section.



49 static struct fb_fix_screeninfo vesafb_fix __initdata = {
50 .id = "VESA VGA",
51 .type = FB_TYPE_PACKED_PIXELS,
52 .accel = FB_ACCEL_NONE,
53 };

527 static int __exit vesafb_remove(struct platform_device *device)
528 {
529 struct fb_info *info = dev_get_drvdata(&device->dev);
530
531 unregister_framebuffer(info);
532 #ifdef CONFIG_MTRR
533 {
534 struct vesafb_info *vfb_info = (struct vesafb_info *) info->par;
535 if (vfb_info->mtrr_hdl >= 0)
536 mtrr_del(vfb_info->mtrr_hdl, 0, 0);
537 }
538 #endif
539 iounmap(info->screen_base);
540 framebuffer_release(info);
541 release_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len);
| |
These values are no longer valid upon unloading.
542
543 return 0;
544 }

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 03-30-2012, 03:39 PM
Tim Gardner
 
Default Section mismatch warnings

BugLink: http://bugs.launchpad.net/bugs/969309

I guess I ought to do a more exhaustive audit for these section
mismatches. It makes me wonder why we haven't had more problems with
section mismatches.

rtg
--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 05:33 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org