1. 11 Sep, 2009 2 commits
    • Masami Hiramatsu's avatar
      x86/ptrace: Fix regs_get_argument_nth() to add correct offset · ad5cafcd
      Masami Hiramatsu authored
      Fix regs_get_argument_nth() to add correct offset bytes. Because
      offset_of() returns offset in byte, the offset should be added
      to char * instead of unsigned long *.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Frank Ch. Eigler <fche@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: K.Prasad <prasad@linux.vnet.ibm.com>
      Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20090910235306.22412.31613.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      ad5cafcd
    • Masami Hiramatsu's avatar
      kprobes/x86-32: Move irq-exit functions to kprobes section · a00e817f
      Masami Hiramatsu authored
      Move irq-exit functions to .kprobes.text section to protect against
      kprobes recursion.
      
      When I ran kprobe stress test on x86-32, I found below symbols
      cause unrecoverable recursive probing:
      
      	ret_from_exception
      	ret_from_intr
      	check_userspace
      	restore_all
      	restore_all_notrace
      	restore_nocheck
      	irq_return
      
      And also, I found some interrupt/exception entry points that
      cause similar problems.
      
      This patch moves those symbols (including their container functions)
      to .kprobes.text section to prevent any kprobes probing.
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      LKML-Reference: <20090908164755.24050.81182.stgit@dhcp-100-2-132.bos.redhat.com>
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      a00e817f
  2. 10 Sep, 2009 2 commits
  3. 06 Sep, 2009 2 commits
  4. 05 Sep, 2009 31 commits
  5. 04 Sep, 2009 3 commits
    • Steven Rostedt's avatar
      ring-buffer: only enable ring_buffer_swap_cpu when needed · 85bac32c
      Steven Rostedt authored
      Since the ability to swap the cpu buffers adds a small overhead to
      the recording of a trace, we only want to add it when needed.
      
      Only the irqsoff and preemptoff tracers use this feature, and both are
      not recommended for production kernels. This patch disables its use
      when neither irqsoff nor preemptoff is configured.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      85bac32c
    • Steven Rostedt's avatar
      ring-buffer: check for swapped buffers in start of committing · 62f0b3eb
      Steven Rostedt authored
      Because the irqsoff tracer can swap an internal CPU buffer, it is possible
      that a swap happens between the start of the write and before the committing
      bit is set (the committing bit will disable swapping).
      
      This patch adds a check for this and will fail the write if it detects it.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      62f0b3eb
    • Steven Rostedt's avatar
      tracing: report error in trace if we fail to swap latency buffer · e8165dbb
      Steven Rostedt authored
      The irqsoff tracer will fail to swap the cpu buffer with the max
      buffer if it preempts a commit. Instead of ignoring this, this patch
      makes the tracer report it if the last max latency failed due to preempting
      a current commit.
      
      The output of the latency tracer will look like this:
      
       # tracer: irqsoff
       #
       # irqsoff latency trace v1.1.5 on 2.6.31-rc5
       # --------------------------------------------------------------------
       # latency: 112 us, #1/1, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:4)
       #    -----------------
       #    | task: -4281 (uid:0 nice:0 policy:0 rt_prio:0)
       #    -----------------
       #  => started at: save_args
       #  => ended at:   __do_softirq
       #
       #
       #                  _------=> CPU#
       #                 / _-----=> irqs-off
       #                | / _----=> need-resched
       #                || / _---=> hardirq/softirq
       #                ||| / _--=> preempt-depth
       #                |||| /
       #                |||||     delay
       #  cmd     pid   ||||| time  |   caller
       #     \   /      |||||   \   |   /
          bash-4281    1d.s6  265us : update_max_tr_single: Failed to swap buffers due to commit in progress
      
      Note the latency time and the functions that disabled the irqs or preemption
      will still be listed.
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      e8165dbb