1. 06 Feb, 2008 1 commit
  2. 30 Jan, 2008 1 commit
  3. 16 Oct, 2007 2 commits
    • Masami Hiramatsu's avatar
      kprobes: support kretprobe blacklist · f438d914
      Masami Hiramatsu authored
      
      Introduce architecture dependent kretprobe blacklists to prohibit users
      from inserting return probes on the function in which kprobes can be
      inserted but kretprobes can not.
      
      This patch also removes "__kprobes" mark from "__switch_to" on x86_64 and
      registers "__switch_to" to the blacklist on x86-64, because that mark is to
      prohibit user from inserting only kretprobe.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
      Acked-by: default avatarAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f438d914
    • Christoph Hellwig's avatar
      x86: optimize page faults like all other achitectures and kill notifier cruft · 74a0b576
      Christoph Hellwig authored
      
      x86(-64) are the last architectures still using the page fault notifier
      cruft for the kprobes page fault hook.  This patch converts them to the
      proper direct calls, and removes the now unused pagefault notifier bits
      aswell as the cruft in kprobes.c that was related to this mess.
      
      I know Andi didn't really like this, but all other architecture maintainers
      agreed the direct calls are much better and besides the obvious cruft
      removal a common way of dealing with kprobes across architectures is
      important aswell.
      
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix sparc64]
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: <linux-arch@vger.kernel.org>
      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>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: Linus Torv...
      74a0b576
  4. 11 Aug, 2007 1 commit
    • Peter Chubb's avatar
      fix compilation with gcc 4.2 · cd5bfea2
      Peter Chubb authored
      
      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: default avatarPeter 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cd5bfea2
  5. 19 Jul, 2007 1 commit
  6. 08 May, 2007 7 commits
  7. 20 Feb, 2007 1 commit
    • Srinivasa Ds's avatar
      [PATCH] kprobes: list all active probes in the system · 346fd59b
      Srinivasa Ds authored
      
      This patch lists all active probes in the system by scanning through
      kprobe_table[].  It takes care of aggregate handlers and prints the type of
      the probe.  Letter "k" for kprobes, "j" for jprobes, "r" for kretprobes.
      It also lists address of the instruction,its symbolic name(function name +
      offset) and the module name.  One can access this file through
      /sys/kernel/debug/kprobes/list.
      
      Output looks like this
      =====================
      llm40:~/a # cat /sys/kernel/debug/kprobes/list
      c0169ae3  r  sys_read+0x0
      c0169ae3  k  sys_read+0x0
      c01694c8  k  vfs_write+0x0
      c0167d20  r  sys_open+0x0
      f8e658a6  k  reiserfs_delete_inode+0x0  reiserfs
      c0120f4a  k  do_fork+0x0
      c0120f4a  j  do_fork+0x0
      c0169b4a  r  sys_write+0x0
      c0169b4a  k  sys_write+0x0
      c0169622  r  vfs_read+0x0
      =================================
      
      [akpm@linux-foundation.org: cleanup]
      [ananth@in.ibm.com: sparc build fix]
      Signed-off-by: default avatarSrinivasa DS <srinivasa@in.ibm.com>
      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>
      Signed-off-by: default avatarAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      346fd59b
  8. 30 Jan, 2007 1 commit
  9. 07 Dec, 2006 1 commit
    • Masami Hiramatsu's avatar
      [PATCH] kprobes: enable booster on the preemptible kernel · b4c6c34a
      Masami Hiramatsu authored
      
      When we are unregistering a kprobe-booster, we can't release its
      instruction buffer immediately on the preemptive kernel, because some
      processes might be preempted on the buffer.  The freeze_processes() and
      thaw_processes() functions can clean most of processes up from the buffer.
      There are still some non-frozen threads who have the PF_NOFREEZE flag.  If
      those threads are sleeping (not preempted) at the known place outside the
      buffer, we can ensure safety of freeing.
      
      However, the processing of this check routine takes a long time.  So, this
      patch introduces the garbage collection mechanism of insn_slot.  It also
      introduces the "dirty" flag to free_insn_slot because of efficiency.
      
      The "clean" instruction slots (dirty flag is cleared) are released
      immediately.  But the "dirty" slots which are used by boosted kprobes, are
      marked as garbages.  collect_garbage_slots() will be invoked to release
      "dirty" slots if there are more than INSNS_PER_PAGE garbage slots or if
      there are no unused slots.
      
      Cc: "Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: "bibo,mao" <bibo.mao@intel.com>
      Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
      Cc: Yumiko Sugita <yumiko.sugita.yf@hitachi.com>
      Cc: Satoshi Oshima <soshima@redhat.com>
      Cc: Hideo Aoki <haoki@redhat.com>
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      b4c6c34a
  10. 02 Oct, 2006 3 commits
  11. 31 Jul, 2006 1 commit
  12. 26 Jun, 2006 3 commits
  13. 20 Apr, 2006 1 commit
  14. 26 Mar, 2006 1 commit
    • bibo mao's avatar
      [PATCH] kretprobe instance recycled by parent process · c6fd91f0
      bibo mao authored
      
      When kretprobe probes the schedule() function, if the probed process exits
      then schedule() will never return, so some kretprobe instances will never
      be recycled.
      
      In this patch the parent process will recycle retprobe instances of the
      probed function and there will be no memory leak of kretprobe instances.
      Signed-off-by: default avatarbibo mao <bibo.mao@intel.com>
      Cc: Masami Hiramatsu <hiramatu@sdl.hitachi.co.jp>
      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>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c6fd91f0
  15. 23 Mar, 2006 1 commit
  16. 03 Feb, 2006 2 commits
  17. 11 Jan, 2006 1 commit
    • Keshavamurthy Anil S's avatar
      [PATCH] kprobes: fix unloading of self probed module · df019b1d
      Keshavamurthy Anil S authored
      
      When a kprobes modules is written in such a way that probes are inserted on
      itself, then unload of that moudle was not possible due to reference
      couning on the same module.
      
      The below patch makes a check and incrementes the module refcount only if
      it is not a self probed module.
      
      We need to allow modules to probe themself for kprobes performance
      measurements
      
      This patch has been tested on several x86_64, ppc64 and IA64 architectures.
      
      Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      df019b1d
  18. 10 Jan, 2006 6 commits
  19. 12 Dec, 2005 3 commits
  20. 07 Nov, 2005 2 commits