1. 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
  2. 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
  3. 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
  4. 14 12月, 2006 1 次提交
  5. 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
  6. 25 10月, 2006 1 次提交
  7. 27 9月, 2006 1 次提交
    • M
      [PATCH] EISA bus MODALIAS attributes support · 07563c71
      Michael Tokarev 提交于
      Add modalias attribute support for the almost forgotten now EISA bus and
      (at least some) EISA-aware modules.
      
      The modalias entry looks like (for an 3c509 NIC):
      
       eisa:sTCM5093
      
      and the in-module alias like:
      
       eisa:sTCM5093*
      
      The patch moves struct eisa_device_id declaration from include/linux/eisa.h
      to include/linux/mod_devicetable.h (so that the former now #includes the
      latter), adds proper MODULE_DEVICE_TABLE(eisa, ...) statements for all
      drivers with EISA IDs I found (some drivers already have that DEVICE_TABLE
      declared), and adds recognision of __mod_eisa_device_table to
      scripts/mod/file2alias.c so that proper modules.alias will be generated.
      
      There's no support for /lib/modules/$kver/modules.eisamap, as it's not used
      by any existing tools, and because with in-kernel modalias mechanism those
      maps are obsolete anyway.
      
      The rationale for this patch is:
      
       a) to make EISA bus to act as other busses with modalias
          support, to unify driver loading
      
       b) to foget about EISA finally - with this patch, kernel
          (who still supports EISA) will be the only one who knows
          how to choose the necessary drivers for this bus ;)
      
      [akpm@osdl.org: fix the kbuild bit]
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Acked-the-net-bits-by: NJeff Garzik <jeff@garzik.org>
      Acked-the-tulip-bit-by: NValerie Henson <val_henson@linux.intel.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      07563c71
  8. 25 9月, 2006 3 次提交
  9. 20 9月, 2006 1 次提交
    • M
      [S390] zcrypt adjunct processor bus. · 1534c382
      Martin Schwidefsky 提交于
      Add a bus for the adjunct processor interface. Up to 64 devices can
      be connect to the ap bus interface, each device with 16 domains. That
      makes 1024 message queues. The interface is asynchronous, the answer
      to a message sent to a queue needs to be received at some later point
      in time. Unfortunately the interface does not provide interrupts when
      a message reply is pending. So the ap bus needs to implement some
      fancy polling, each active queue is polled once per 1/HZ second or
      continuously if an idle cpus exsists and the poll thread is activ
      (see poll_thread parameter).
      
      The ap bus uses the sysfs path /sys/bus/ap and has two bus attributes,
      ap_domain and config_time. The ap_domain selects one of the 16 domains
      to be used for this system. This limits the maximum number of ap devices
      to 64. The config_time attribute contains the number of seconds between
      two ap bus scans to find new devices.
      
      The ap bus uses the modalias entries of the form "ap:tN" to autoload
      the ap driver for hardware type N. Currently known types are:
      3 - PCICC, 4 - PCICA, 5 - PCIXCC, 6 - CEX2A and 7 - CEX2C.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NRalph Wuerthner <rwuerthn@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      1534c382
  10. 16 8月, 2006 1 次提交
    • H
      [PATCH] PATCH: 1 line 2.6.18 bugfix: modpost-64bit-fix.patch · e0e92632
      Hans de Goede 提交于
      There is a small but annoying bug in scripts/mod/file2alias.c which causes
      it to generate invalid aliases for input devices on 64 bit archs. This causes
      joydev.ko to not be automaticly loaded when inserting a joystick, resulting in
      a non working joystick (for the average user).
      
      In scripts/mod/file2alias.c is the following code for generating the input
      aliases:
      static void do_input(char *alias,
                           kernel_ulong_t *arr, unsigned int min, unsigned int max)
      {
              unsigned int i;
      
              for (i = min; i < max; i++)
                      if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
                              sprintf(alias + strlen(alias), "%X,*", i);
      }
      
      On 32 bits systems, this correctly generates "0,*" for the first alias, "8,*"
      for the second etc.
      
      However on 64 bits it generates: "0,*20,*" resp "8,*28,*" Notice how it adds 20
      + first entry (hex) ! to the list of hex codes, which is 32 more then the first
      entry, thus is because the bit test above wraps at 32 bits instead of 64.
      
      scripts/mod/file2alias.c, line 379 reads:
                      if (arr[i / BITS_PER_LONG] & (1 << (i%BITS_PER_LONG)))
      That should be:
                      if (arr[i / BITS_PER_LONG] & (1L << (i%BITS_PER_LONG)))
      
      Notice the added 'L' after the 1, otherwise that is an 32 bit int instead of a
      64 bit long, and when that int gets shifted >= 32 times, appearantly the number
      by which to shift is wrapped at 5 bits ( % 32) causing it to test a bit 32 bits
      too low.
      
      The patch below makes the nescesarry 1 char change :)
      Signed-off-by: NHans de Goede <j.w.r.degoede@hhs.nl>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e0e92632
  11. 01 8月, 2006 1 次提交
    • S
      kbuild: improve error from file2alias · fb33d816
      Sam Ravnborg 提交于
      The original errormessage was just plain unreadable.
      
      Sample error message after this update (not for real - I provoked it):
      
      FATAL: drivers/net/s2io: sizeof(struct pci_device_id)=33 is not a modulo of the
      size of section __mod_pci_device_table=160.
      Fix definition of struct pci_device_id in mod_devicetable.h
      
      Before a warning was generated - this is now a fatal error.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      fb33d816
  12. 01 7月, 2006 2 次提交
  13. 25 6月, 2006 2 次提交
  14. 17 6月, 2006 1 次提交
  15. 10 6月, 2006 3 次提交
  16. 09 6月, 2006 2 次提交
  17. 22 5月, 2006 2 次提交
  18. 09 5月, 2006 1 次提交
  19. 01 5月, 2006 2 次提交
  20. 26 4月, 2006 1 次提交
  21. 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
  22. 11 4月, 2006 1 次提交
  23. 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
  24. 09 3月, 2006 1 次提交
  25. 07 3月, 2006 1 次提交
  26. 05 3月, 2006 4 次提交
  27. 03 3月, 2006 1 次提交