1. 03 11月, 2009 1 次提交
  2. 02 10月, 2009 1 次提交
  3. 23 9月, 2009 1 次提交
  4. 31 7月, 2009 1 次提交
  5. 01 7月, 2009 2 次提交
  6. 09 5月, 2009 1 次提交
  7. 07 4月, 2009 4 次提交
  8. 18 3月, 2009 1 次提交
    • A
      kprobes: Fix locking imbalance in kretprobes · f02b8624
      Ananth N Mavinakayanahalli 提交于
      Fix locking imbalance in kretprobes:
      
      =====================================
      [ BUG: bad unlock balance detected! ]
      -------------------------------------
      kthreadd/2 is trying to release lock (&rp->lock) at:
      [<c06b3080>] pre_handler_kretprobe+0xea/0xf4
      but there are no more locks to release!
      
      other info that might help us debug this:
      1 lock held by kthreadd/2:
       #0:  (rcu_read_lock){..--}, at: [<c06b2b24>] __atomic_notifier_call_chain+0x0/0x5a
      
      stack backtrace:
      Pid: 2, comm: kthreadd Not tainted 2.6.29-rc8 #1
      Call Trace:
       [<c06ae498>] ? printk+0xf/0x17
       [<c06b3080>] ? pre_handler_kretprobe+0xea/0xf4
       [<c044ce6c>] print_unlock_inbalance_bug+0xc3/0xce
       [<c0444d4b>] ? clocksource_read+0x7/0xa
       [<c04450a4>] ? getnstimeofday+0x5f/0xf6
       [<c044a9ca>] ? register_lock_class+0x17/0x293
       [<c044b72c>] ? mark_lock+0x1e/0x30b
       [<c0448956>] ? tick_dev_program_event+0x4a/0xbc
       [<c0498100>] ? __slab_alloc+0xa5/0x415
       [<c06b2fbe>] ? pre_handler_kretprobe+0x28/0xf4
       [<c06b3080>] ? pre_handler_kretprobe+0xea/0xf4
       [<c044cf1b>] lock_release_non_nested+0xa4/0x1a5
       [<c06b3080>] ? pre_handler_kretprobe+0xea/0xf4
       [<c044d15d>] lock_release+0x141/0x166
       [<c06b07dd>] _spin_unlock_irqrestore+0x19/0x50
       [<c06b3080>] pre_handler_kretprobe+0xea/0xf4
       [<c06b20b5>] kprobe_exceptions_notify+0x1c9/0x43e
       [<c06b2b02>] notifier_call_chain+0x26/0x48
       [<c06b2b5b>] __atomic_notifier_call_chain+0x37/0x5a
       [<c06b2b24>] ? __atomic_notifier_call_chain+0x0/0x5a
       [<c06b2b8a>] atomic_notifier_call_chain+0xc/0xe
       [<c0442d0d>] notify_die+0x2d/0x2f
       [<c06b0f9c>] do_int3+0x1f/0x71
       [<c06b0e84>] int3+0x2c/0x34
       [<c042d476>] ? do_fork+0x1/0x288
       [<c040221b>] ? kernel_thread+0x71/0x79
       [<c043ed1b>] ? kthread+0x0/0x60
       [<c043ed1b>] ? kthread+0x0/0x60
       [<c04040b8>] ? kernel_thread_helper+0x0/0x10
       [<c043ec7f>] kthreadd+0xac/0x148
       [<c043ebd3>] ? kthreadd+0x0/0x148
       [<c04040bf>] kernel_thread_helper+0x7/0x10
      Signed-off-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Tested-by: NBharata B Rao <bharata@linux.vnet.ibm.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: <stable@kernel.org> [2.6.29.x, 2.6.28.x, 2.6.27.x]
      LKML-Reference: <20090318113621.GB4129@in.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f02b8624
  9. 06 3月, 2009 1 次提交
  10. 17 1月, 2009 1 次提交
  11. 07 1月, 2009 6 次提交
  12. 13 11月, 2008 2 次提交
  13. 17 10月, 2008 1 次提交
  14. 26 7月, 2008 2 次提交
    • A
      kprobes: remove redundant config check · 8b6dd986
      Abhishek Sagar 提交于
      I noticed that there's a CONFIG_KPROBES check inside kernel/kprobes.c,
      which is redundant.
      Signed-off-by: NAbhishek Sagar <sagar.abhishek@gmail.com>
      Acked-by: NMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8b6dd986
    • S
      kprobes: improve kretprobe scalability with hashed locking · ef53d9c5
      Srinivasa D S 提交于
      Currently list of kretprobe instances are stored in kretprobe object (as
      used_instances,free_instances) and in kretprobe hash table.  We have one
      global kretprobe lock to serialise the access to these lists.  This causes
      only one kretprobe handler to execute at a time.  Hence affects system
      performance, particularly on SMP systems and when return probe is set on
      lot of functions (like on all systemcalls).
      
      Solution proposed here gives fine-grain locks that performs better on SMP
      system compared to present kretprobe implementation.
      
      Solution:
      
       1) Instead of having one global lock to protect kretprobe instances
          present in kretprobe object and kretprobe hash table.  We will have
          two locks, one lock for protecting kretprobe hash table and another
          lock for kretporbe object.
      
       2) We hold lock present in kretprobe object while we modify kretprobe
          instance in kretprobe object and we hold per-hash-list lock while
          modifying kretprobe instances present in that hash list.  To prevent
          deadlock, we never grab a per-hash-list lock while holding a kretprobe
          lock.
      
       3) We can remove used_instances from struct kretprobe, as we can
          track used instances of kretprobe instances using kretprobe hash
          table.
      
      Time duration for kernel compilation ("make -j 8") on a 8-way ppc64 system
      with return probes set on all systemcalls looks like this.
      
      cacheline              non-cacheline             Un-patched kernel
      aligned patch 	       aligned patch
      ===============================================================================
      real    9m46.784s       9m54.412s                  10m2.450s
      user    40m5.715s       40m7.142s                  40m4.273s
      sys     2m57.754s       2m58.583s                  3m17.430s
      ===========================================================
      
      Time duration for kernel compilation ("make -j 8) on the same system, when
      kernel is not probed.
      =========================
      real    9m26.389s
      user    40m8.775s
      sys     2m7.283s
      =========================
      Signed-off-by: NSrinivasa DS <srinivasa@in.ibm.com>
      Signed-off-by: NJim Keniston <jkenisto@us.ibm.com>
      Acked-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ef53d9c5
  15. 11 7月, 2008 1 次提交
  16. 13 6月, 2008 1 次提交
  17. 28 4月, 2008 4 次提交
  18. 05 3月, 2008 2 次提交
  19. 07 2月, 2008 1 次提交
  20. 30 1月, 2008 1 次提交
  21. 17 10月, 2007 2 次提交
  22. 12 8月, 2007 1 次提交
    • P
      fix compilation with gcc 4.2 · cd5bfea2
      Peter Chubb 提交于
      gcc-4.2 is a lot more picky about its symbol handling.  EXPORT_SYMBOL no
      longer works on symbols that are undefined or defined with static scope.
      
      For example, with CONFIG_PROFILE off, I see:
      
        kernel/profile.c:206: error: __ksymtab_profile_event_unregister causes a section type conflict
        kernel/profile.c:205: error: __ksymtab_profile_event_register causes a section type conflict
      
      This patch moves the EXPORTs inside the #ifdef CONFIG_PROFILE, so we
      only try to export symbols that are defined.
      
      Also, in kernel/kprobes.c there's an EXPORT_SYMBOL_GPL() for
      jprobes_return, which if CONFIG_JPROBES is undefined is a static
      inline and gives the same error.
      
      And in drivers/acpi/resources/rsxface.c, there's an
      ACPI_EXPORT_SYMBOPL() for a static symbol. If it's static, it's not
      accessible from outside the compilation unit, so should bot be exported.
      
      These three changes allow building a zx1_defconfig kernel with gcc 4.2
      on IA64.
      
      [akpm@linux-foundation.org: export jpobe_return properly]
      Signed-off-by: NPeter Chubb <peterc@gelato.unsw.edu.au>
      Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Len Brown <lenb@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd5bfea2
  23. 20 7月, 2007 1 次提交
  24. 09 5月, 2007 1 次提交
    • A
      Kprobes: The ON/OFF knob thru debugfs · bf8f6e5b
      Ananth N Mavinakayanahalli 提交于
      This patch provides a debugfs knob to turn kprobes on/off
      
      o A new file /debug/kprobes/enabled indicates if kprobes is enabled or
        not (default enabled)
      o Echoing 0 to this file will disarm all installed probes
      o Any new probe registration when disabled will register the probe but
        not arm it. A message will be printed out in such a case.
      o When a value 1 is echoed to the file, all probes (including ones
        registered in the intervening period) will be enabled
      o Unregistration will happen irrespective of whether probes are globally
        enabled or not.
      o Update Documentation/kprobes.txt to reflect these changes. While there
        also update the doc to make it current.
      
      We are also looking at providing sysrq key support to tie to the disabling
      feature provided by this patch.
      
      [akpm@linux-foundation.org: Use bool like a bool!]
      [akpm@linux-foundation.org: add printk facility levels]
      [cornelia.huck@de.ibm.com: Add the missing arch_trampoline_kprobe() for s390]
      Signed-off-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Signed-off-by: NSrinivasa DS <srinivasa@in.ibm.com>
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bf8f6e5b