1. 28 7月, 2008 1 次提交
  2. 22 7月, 2008 5 次提交
    • R
      modules: Take a shortcut for checking if an address is in a module · 3a642e99
      Rusty Russell 提交于
      This patch keeps track of the boundaries of module allocation, in
      order to speed up module_text_address().
      
      Inspired by Arjan's version, which required arch-specific defines:
      
      	Various pieces of the kernel (lockdep, latencytop, etc) tend
      	to store backtraces, sometimes at a relatively high
      	frequency. In itself this isn't a big performance deal (after
      	all you're using diagnostics features), but there have been
      	some complaints from people who have over 100 modules loaded
      	that this is a tad too slow.
      
      	This is due to the new backtracer code which looks at every
      	slot on the stack to see if it's a kernel/module text address,
      	so that's 1024 slots.  1024 times 100 modules... that's a lot
      	of list walking.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      3a642e99
    • D
      module: turn longs into ints for module sizes · 2f0f2a33
      Denys Vlasenko 提交于
      This shrinks module.o and each *.ko file.
      
      And finally, structure members which hold length of module
      code (four such members there) and count of symbols
      are converted from longs to ints.
      
      We cannot possibly have a module where 32 bits won't
      be enough to hold such counts.
      
      For one, module loading checks module size for sanity
      before loading, so such insanely big module will fail
      that test first.
      Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      2f0f2a33
    • D
      Shrink struct module: CONFIG_UNUSED_SYMBOLS ifdefs · f7f5b675
      Denys Vlasenko 提交于
      module.c and module.h conatains code for finding
      exported symbols which are declared with EXPORT_UNUSED_SYMBOL,
      and this code is compiled in even if CONFIG_UNUSED_SYMBOLS is not set
      and thus there can be no EXPORT_UNUSED_SYMBOLs in modules anyway
      (because EXPORT_UNUSED_SYMBOL(x) are compiled out to nothing then).
      
      This patch adds required #ifdefs.
      Signed-off-by: NDenys Vlasenko <vda.linux@googlemail.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      f7f5b675
    • R
      module: generic each_symbol iterator function · dafd0940
      Rusty Russell 提交于
      Introduce an each_symbol() iterator to avoid duplicating the knowledge
      about the 5 different sections containing symbols.  Currently only
      used by find_symbol(), but will be used by symbol_put_addr() too.
      
      (Includes NULL ptr deref fix by Jiri Kosina <jkosina@suse.cz>)
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Jiri Kosina <jkosina@suse.cz>
      dafd0940
    • R
      module: don't use stop_machine for waiting rmmod · da39ba5e
      Rusty Russell 提交于
      rmmod has a little-used "-w" option, meaning that instead of failing if the
      module is in use, it should block until the module becomes unused.
      
      In this case, we don't need to use stop_machine: Max Krasnyansky
      indicated that would be useful for SystemTap which loads/unloads new
      modules frequently.
      
      Cc: Max Krasnyansky <maxk@qualcomm.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      da39ba5e
  3. 23 5月, 2008 2 次提交
  4. 09 5月, 2008 2 次提交
  5. 05 5月, 2008 1 次提交
    • L
      Make forced module loading optional · 826e4506
      Linus Torvalds 提交于
      The kernel module loader used to be much too happy to allow loading of
      modules for the wrong kernel version by default.  For example, if you
      had MODVERSIONS enabled, but tried to load a module with no version
      info, it would happily load it and taint the kernel - whether it was
      likely to actually work or not!
      
      Generally, such forced module loading should be considered a really
      really bad idea, so make it conditional on a new config option
      (MODULE_FORCE_LOAD), and make it default to off.
      
      If somebody really wants to force module loads, that's their problem,
      but we should not encourage it.  Especially as it happened to me by
      mistake (ie regular unversioned Fedora modules getting loaded) causing
      lots of strange behavior.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      826e4506
  6. 01 5月, 2008 6 次提交
  7. 19 4月, 2008 1 次提交
  8. 11 3月, 2008 2 次提交
  9. 05 3月, 2008 1 次提交
  10. 22 2月, 2008 1 次提交
  11. 14 2月, 2008 1 次提交
    • M
      Linux Kernel Markers: support multiple probes · fb40bd78
      Mathieu Desnoyers 提交于
      RCU style multiple probes support for the Linux Kernel Markers.  Common case
      (one probe) is still fast and does not require dynamic allocation or a
      supplementary pointer dereference on the fast path.
      
      - Move preempt disable from the marker site to the callback.
      
      Since we now have an internal callback, move the preempt disable/enable to the
      callback instead of the marker site.
      
      Since the callback change is done asynchronously (passing from a handler that
      supports arguments to a handler that does not setup the arguments is no
      arguments are passed), we can safely update it even if it is outside the
      preempt disable section.
      
      - Move probe arm to probe connection. Now, a connected probe is automatically
        armed.
      
      Remove MARK_MAX_FORMAT_LEN, unused.
      
      This patch modifies the Linux Kernel Markers API : it removes the probe
      "arm/disarm" and changes the probe function prototype : it now expects a
      va_list * instead of a "...".
      
      If we want to have more than one probe connected to a marker at a given
      time (LTTng, or blktrace, ssytemtap) then we need this patch. Without it,
      connecting a second probe handler to a marker will fail.
      
      It allow us, for instance, to do interesting combinations :
      
      Do standard tracing with LTTng and, eventually, to compute statistics
      with SystemTAP, or to have a special trigger on an event that would call
      a systemtap script which would stop flight recorder tracing.
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Mike Mason <mmlnx@us.ibm.com>
      Cc: Dipankar Sarma <dipankar@in.ibm.com>
      Cc: David Smith <dsmith@redhat.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fb40bd78
  12. 09 2月, 2008 3 次提交
  13. 30 1月, 2008 1 次提交
  14. 29 1月, 2008 6 次提交
  15. 28 1月, 2008 1 次提交
  16. 26 1月, 2008 2 次提交
    • A
      debug: track and print last unloaded module in the oops trace · e14af7ee
      Arjan van de Ven 提交于
      Based on a suggestion from Andi:
      
       In various cases, the unload of a module may leave some bad state around
       that causes a kernel crash AFTER a module is unloaded; and it's then hard
       to find which module caused that.
      
      This patch tracks the last unloaded module, and prints this as part of the
      module list in the oops trace.
      
      Right now, only the last 1 module is tracked; I expect that this is enough
      for the vast majority of cases where this information matters; if it turns
      out that tracking more is important, we can always extend it to that.
      
      [ mingo@elte.hu: build fix ]
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e14af7ee
    • A
      debug: show being-loaded/being-unloaded indicator for modules · 21aa9280
      Arjan van de Ven 提交于
      It's rather common that an oops/WARN_ON/BUG happens during the load or
      unload of a module. Unfortunatly, it's not always easy to see directly
      which module is being loaded/unloaded from the oops itself. Worse,
      it's not even always possible to ask the bug reporter, since there
      are so many components (udev etc) that auto-load modules that there's
      a good chance that even the reporter doesn't know which module this is.
      
      This patch extends the existing "show if it's tainting" print code,
      which is used as part of printing the modules in the oops/BUG/WARN_ON
      to include a "+" for "being loaded" and a "-" for "being unloaded".
      
      As a result this extension, the "taint_flags()" function gets renamed to
      "module_flags()" (and takes a module struct as argument, not a taint
      flags int).
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      21aa9280
  17. 25 1月, 2008 4 次提交