1. 07 11月, 2005 1 次提交
    • A
      [PATCH] Kprobes: rearrange preempt_disable/enable() calls · 66ff2d06
      Ananth N Mavinakayanahalli 提交于
      The following set of patches are aimed at improving kprobes scalability.  We
      currently serialize kprobe registration, unregistration and handler execution
      using a single spinlock - kprobe_lock.
      
      With these changes, kprobe handlers can run without any locks held.  It also
      allows for simultaneous kprobe handler executions on different processors as
      we now track kprobe execution on a per processor basis.  It is now necessary
      that the handlers be re-entrant since handlers can run concurrently on
      multiple processors.
      
      All changes have been tested on i386, ia64, ppc64 and x86_64, while sparc64
      has been compile tested only.
      
      The patches can be viewed as 3 logical chunks:
      
      patch 1: 	Reorder preempt_(dis/en)able calls
      patches 2-7: 	Introduce per_cpu data areas to track kprobe execution
      patches 8-9: 	Use RCU to synchronize kprobe (un)registration and handler
      		execution.
      
      Thanks to Maneesh Soni, James Keniston and Anil Keshavamurthy for their
      review and suggestions. Thanks again to Anil, Hien Nguyen and Kevin Stafford
      for testing the patches.
      
      This patch:
      
      Reorder preempt_disable/enable() calls in arch kprobes files in preparation to
      introduce locking changes.  No functional changes introduced by this patch.
      Signed-off-by: NAnanth N Mavinakayahanalli <ananth@in.ibm.com>
      Signed-off-by: NAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      66ff2d06
  2. 08 9月, 2005 3 次提交
  3. 06 7月, 2005 1 次提交
  4. 28 6月, 2005 3 次提交
    • K
      [PATCH] kprobes/ia64: refuse kprobe on ivt code · c7b645f9
      Keshavamurthy Anil S 提交于
      Not safe to insert kprobes on IVT code.
      
      This patch checks to see if the address on which Kprobes is being inserted is
      in ivt code and if it is in ivt code then refuse to register kprobe.
      Signed-off-by: NAnil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Acked-by: NDavid Mosberger <davidm@napali.hpl.hp.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c7b645f9
    • R
      [PATCH] kprobes/ia64: refuse inserting kprobe on slot 1 · a528e21c
      Rusty Lynch 提交于
      Without the ability to atomically write 16 bytes, we can not update the
      middle slot of a bundle, slot 1, unless we stop the machine first.  This
      patch will ensure the ability to robustly insert and remove a kprobe by
      refusing to insert a kprobe on slot 1 until a mechanism is in place to
      safely handle this case.
      Signed-off-by: NRusty Lynch <rusty.lynch@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a528e21c
    • R
      [PATCH] Return probe redesign: ia64 specific implementation · 9508dbfe
      Rusty Lynch 提交于
      The following patch implements function return probes for ia64 using
      the revised design.  With this new design we no longer need to do some
      of the odd hacks previous required on the last ia64 return probe port
      that I sent out for comments.
      
      Note that this new implementation still does not resolve the problem noted
      by Keith Owens where backtrace data is lost after a return probe is hit.
      
      Changes include:
       * Addition of kretprobe_trampoline to act as a dummy function for instrumented
         functions to return to, and for the return probe infrastructure to place
         a kprobe on on, gaining control so that the return probe handler
         can be called, and so that the instruction pointer can be moved back
         to the original return address.
       * Addition of arch_init(), allowing a kprobe to be registered on
         kretprobe_trampoline
       * Addition of trampoline_probe_handler() which is used as the pre_handler
         for the kprobe inserted on kretprobe_implementation.  This is the function
         that handles the details for calling the return probe handler function
         and returning control back at the original return address
       * Addition of arch_prepare_kretprobe() which is setup as the pre_handler
         for a kprobe registered at the beginning of the target function by
         kernel/kprobes.c so that a return probe instance can be setup when
         a caller enters the target function.  (A return probe instance contains
         all the needed information for trampoline_probe_handler to do it's job.)
       * Hooks added to the exit path of a task so that we can cleanup any left-over
         return probe instances (i.e. if a task dies while inside a targeted function
         then the return probe instance was reserved at the beginning of the function
         but the function never returns so we need to mark the instance as unused.)
      Signed-off-by: NRusty Lynch <rusty.lynch@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9508dbfe
  5. 24 6月, 2005 10 次提交