• Vivek Goyal's avatar
    [PATCH] x86-64: Modpost whitelist reference to more symbols (pattern 3) · ee6a8545
    Vivek Goyal authored
    o MODPOST generates warning on i386 if kernel is compiled with
      CONFIG_RELOCATABLE=y.
    
    WARNING: vmlinux - Section mismatch: reference to .init.text:__init_begin from .text between 'free_initmem' (at offset 0xc0114fd3) and 'do_test_wp_bit'
    WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'core_kernel_text' (at offset 0xc012aeae) and 'kernel_text_address'
    WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'core_kernel_text' (at offset 0xc012aeb7) and 'kernel_text_address'
    WARNING: vmlinux - Section mismatch: reference to .init.text:_sinittext from .text between 'get_symbol_pos' (at offset 0xc0135776) and 'reset_iter'
    WARNING: vmlinux - Section mismatch: reference to .init.text:_einittext from .text between 'get_symbol_pos' (at offset 0xc013577d) and 'reset_iter'
    
    o These symbols (__init_begin, _sinittext, _einittext) belong to init
      section and generally represent a section boundary. These are special
      symbols in the sense that their size is zero and no memory is allocated
      for them in init section. Their addr and value are same. So even if
      we free the init section, it is ok to reference them.
    
    o Whitelist access to such select symbols in MODPOST.
    Signed-off-by: default avatarVivek Goyal <vgoyal@in.ibm.com>
    Signed-off-by: default avatarAndi Kleen <ak@suse.de>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Andi Kleen <ak@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    ee6a8545
modpost.c 37.2 KB