1. 03 5月, 2007 6 次提交
  2. 21 2月, 2007 1 次提交
    • D
      [PATCH] remove modpost false warnings on ARM · da68d61f
      David Brownell 提交于
      This patch stops "modpost" from issuing erroneous modpost warnings on ARM
      builds, which it's been doing since since maybe last summer.  A canonical
      example would be driver method table entries:
      
        WARNING: <path> - Section mismatch: reference to .exit.text:<name>_remove
      	from .data after '$d' (at offset 0x4)
      
      That "$d" symbol is generated by tools conformant with ARM ABI specs; in
      this case it's a symbol **in the middle of** a "<name>_driver" struct.
      
      The erroneous warnings appear to be issued because "modpost" whitelists
      references from "<name>_driver" data into init and exit sections ...  but
      doesn't know should also include those "$d" mapping symbols, which are not
      otherwise associated with "<name>_driver" symbols.
      
      This patch prevents the modpost symbol lookup code from ever returning
      those mapping symbols, so it will return a whitelisted symbol instead.
      Then things work as expected.
      
      Now to revert various code-bloating "fixes" that got merged because of this
      modpost bug....
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      da68d61f
  3. 13 2月, 2007 1 次提交
    • V
      [PATCH] i386: move startup_32() in text.head section · f8657e1b
      Vivek Goyal 提交于
      o Entry startup_32 was in .text section but it was accessing some init
        data too and it prompts MODPOST to generate compilation warnings.
      
      WARNING: vmlinux - Section mismatch: reference to .init.data:boot_params from
      .text between '_text' (at offset 0xc0100029) and 'startup_32_smp'
      WARNING: vmlinux - Section mismatch: reference to .init.data:boot_params from
      .text between '_text' (at offset 0xc0100037) and 'startup_32_smp'
      WARNING: vmlinux - Section mismatch: reference to
      .init.data:init_pg_tables_end from .text between '_text' (at offset
      0xc0100099) and 'startup_32_smp'
      
      o Can't move startup_32 to .init.text as this entry point has to be at the
        start of bzImage. Hence moved startup_32 to a new section .text.head and
        instructed MODPOST to not to generate warnings if init data is being
        accessed from .text.head section. This code has been audited.
      
      o SMP boot up code (startup_32_smp) can go into .init.text if CPU hotplug
        is not supported. Otherwise it generates more warnings
      
      WARNING: vmlinux - Section mismatch: reference to .init.data:new_cpu_data from
      .text between 'checkCPUtype' (at offset 0xc0100126) and 'is486'
      WARNING: vmlinux - Section mismatch: reference to .init.data:new_cpu_data from
      .text between 'checkCPUtype' (at offset 0xc0100130) and 'is486'
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      f8657e1b
  4. 09 2月, 2007 1 次提交
    • M
      [PATCH] PA-RISC: Fix bogus warnings from modpost · 742433b0
      Matthew Wilcox 提交于
      parisc and parisc64 seem to name sections a little differently from other
      targets.  parisc64 gives spurious warnings like:
      
      WARNING: drivers/net/dummy.o - Section mismatch: reference to .init.text:dummy_setup from .data.rel.ro between '.LC1' (at offset 0x0) and '.LC6'
      
      and parisc gives spurious warnings like:
      
      WARNING: drivers/net/dummy.o - Section mismatch: reference to .init.text:dummy_setup from .rodata.cst4 between '.LC1' (at offset 0x0) and '.LC6'
      
      Given the other comments in modpost.c, it seems that the best solution is
      to move rodata down to the 'match at start of name' section and add
      .data.rel.ro to the 'match entire name' section.
      
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      742433b0
  5. 11 1月, 2007 2 次提交
    • V
      [PATCH] x86-64: Modpost whitelist reference to more symbols (pattern 3) · ee6a8545
      Vivek Goyal 提交于
      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: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      ee6a8545
    • V
      [PATCH] x86-64: modpost add more symbols to whitelist pattern2 · 118c0ace
      Vivek Goyal 提交于
      o MODPOST generates warning for i386 if compiled with CONFIG_RELOCATABLE=y
        and serial console support is enabled.
      
      o Serial console setup function, serial8250_console_setup(), is a non __init
        function and it calls functions which are of type __init().
        (uart_parse_options() and uart_set_options()). Assuming, setup will
        be called during init time, changing serial8250_console_setup() to __init.
      
      o Adding one more pattern to modpost whitelist. Console drivers might
        have *_console structures containing references to setup functions which
        can be of __init type. Don't generate warnings for those.
      
      WARNING: vmlinux - Section mismatch: reference to .init.text: from .data between 'serial8250_console' (at offset 0xc05a33d8) and 'serial8250_reg'
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      118c0ace
  6. 14 12月, 2006 1 次提交
  7. 07 12月, 2006 1 次提交
    • R
      [PATCH] paravirt: Patch inline replacements for paravirt intercepts · 139ec7c4
      Rusty Russell 提交于
      It turns out that the most called ops, by several orders of magnitude,
      are the interrupt manipulation ops.  These are obvious candidates for
      patching, so mark them up and create infrastructure for it.
      
      The method used is that the ops structure has a patch function, which
      is called for each place which needs to be patched: this returns a
      number of instructions (the rest are NOP-padded).
      
      Usually we can spare a register (%eax) for the binary patched code to
      use, but in a couple of critical places in entry.S we can't: we make
      the clobbers explicit at the call site, and manually clobber the
      allowed registers in debug mode as an extra check.
      
      And:
      
      Don't abuse CONFIG_DEBUG_KERNEL, add CONFIG_DEBUG_PARAVIRT.
      
      And:
      
      AK:  Fix warnings in x86-64 alternative.c build
      
      And:
      
      AK: Fix compilation with defconfig
      
      And:
      
      ^From: Andrew Morton <akpm@osdl.org>
      
      Some binutlises still like to emit references to __stop_parainstructions and
      __start_parainstructions.
      
      And:
      
      AK: Fix warnings about unused variables when PARAVIRT is disabled.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      139ec7c4
  8. 25 10月, 2006 1 次提交
  9. 25 9月, 2006 3 次提交
  10. 01 7月, 2006 2 次提交
  11. 25 6月, 2006 2 次提交
  12. 17 6月, 2006 1 次提交
  13. 10 6月, 2006 3 次提交
  14. 09 6月, 2006 2 次提交
  15. 22 5月, 2006 2 次提交
  16. 09 5月, 2006 1 次提交
  17. 01 5月, 2006 2 次提交
  18. 15 4月, 2006 1 次提交
    • S
      kbuild: fix false section mismatch warnings · 5ecdd0f6
      Sam Ravnborg 提交于
      Darren Jenkins <darrenrjenkins@gmail.com> pointed out a
      number of false positives where we referenced variables
      from a _driver variable.
      Fix it by check for that pattern and ignore it.
      
      Randy.Dunlap <rdunlap@xenotime.net> pointed out a similar
      set of warnings for a number of scsi drivers.
      In scsi world they misname their variables *_template or
      *_sht so add these to list of variables that may have references
      to .init.text with no warning.
      
      Randy.Dunlap <rdunlap@xenotime.net> also pointed out a scsi driver
      with many references to .exit.text from .rodata. This is compiler
      generated references and we already ignore these for .init.text, so
      ignore them for .exit.text also.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      5ecdd0f6
  19. 11 4月, 2006 1 次提交
  20. 17 3月, 2006 1 次提交
    • S
      [PATCH] kbuild: fix buffer overflow in modpost · 7670f023
      Sam Ravnborg 提交于
      Jiri Benc <jbenc@suse.cz> reported that modpost would stop with SIGABRT if
      used with long filepaths.
      The error looked like:
      >   Building modules, stage 2.
      >   MODPOST
      > *** glibc detected *** scripts/mod/modpost: realloc(): invalid next size:
      +0x0809f588 ***
      > [...]
      
      Fix this by allocating at least the required memory + SZ bytes each time.
      Before we sometimes ended up allocating too little memory resuting in the
      glibc detected bug above.  Based on patch originally submitted by: Jiri
      Benc <jbenc@suse.cz>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7670f023
  21. 09 3月, 2006 1 次提交
  22. 05 3月, 2006 4 次提交