1. 12 10月, 2012 1 次提交
    • J
      mips,kgdb: fix recursive page fault with CONFIG_KPROBES · f0a996ee
      Jason Wessel 提交于
      This fault was detected using the kgdb test suite on boot and it
      crashes recursively due to the fact that CONFIG_KPROBES on mips adds
      an extra die notifier in the page fault handler.  The crash signature
      looks like this:
      
      kgdbts:RUN bad memory access test
      KGDB: re-enter exception: ALL breakpoints killed
      Call Trace:
      [<807b7548>] dump_stack+0x20/0x54
      [<807b7548>] dump_stack+0x20/0x54
      
      The fix for now is to have kgdb return immediately if the fault type
      is DIE_PAGE_FAULT and allow the kprobe code to decide what is supposed
      to happen.
      
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      f0a996ee
  2. 05 10月, 2010 1 次提交
  3. 05 8月, 2010 2 次提交
  4. 21 5月, 2010 2 次提交
    • J
      mips,kgdb: kdb low level trap catch and stack trace · 5dd11d5d
      Jason Wessel 提交于
      The only way the debugger can handle a trap in inside rcu_lock,
      notify_die, or atomic_notifier_call_chain without a recursive fault is
      to have a low level "first opportunity handler" do_trap_or_bp() handler.
      
      Generally this will be something the vast majority of folks will not
      need, but for those who need it, it is added as a kernel .config
      option called KGDB_LOW_LEVEL_TRAP.
      
      Also added was a die notification for oops such that kdb can catch an
      oops for analysis.
      
      There appeared to be no obvious way to pass the struct pt_regs from
      the original exception back to the stack back tracer, so a special
      case was added to show_stack() for when kdb is active because you
      generally desire to generally look at the back trace of the original
      exception.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      5dd11d5d
    • J
      kgdb: core changes to support kdb · dcc78711
      Jason Wessel 提交于
      These are the minimum changes to the kgdb core in order to enable an
      API to connect a new front end (kdb) to the debug core.
      
      This patch introduces the dbg_kdb_mode variable controls where the
      user level I/O is routed.  It will be routed to the gdbstub (kgdb) or
      to the kdb front end which is a simple shell available over the kgdboc
      connection.
      
      You can switch back and forth between kdb or the gdb stub mode of
      operation dynamically.  From gdb stub mode you can blindly type
      "$3#33", or from the kdb mode you can enter "kgdb" to switch to the
      gdb stub.
      
      The logic in the debug core depends on kdb to look for the typical gdb
      connection sequences and return immediately with KGDB_PASS_EVENT if a
      gdb serial command sequence is detected.  That should allow a
      reasonably seamless transition between kdb -> gdb without leaving the
      kernel exception state.  The two gdb serial queries that kdb is
      responsible for detecting are the "?" and "qSupported" packets.
      
      CC: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Acked-by: NMartin Hicks <mort@sgi.com>
      dcc78711
  5. 25 6月, 2009 1 次提交
  6. 26 9月, 2008 1 次提交
    • J
      kgdb, x86, arm, mips, powerpc: ignore user space single stepping · d7161a65
      Jason Wessel 提交于
      On the x86 arch, user space single step exceptions should be ignored
      if they occur in the kernel space, such as ptrace stepping through a
      system call.
      
      First check if it is kgdb that is executing a single step, then ensure
      it is not an accidental traversal into the user space, while in kgdb,
      any other time the TIF_SINGLESTEP is set, kgdb should ignore the
      exception.
      
      On x86, arm, mips and powerpc, the kgdb_contthread usage was
      inconsistent with the way single stepping is implemented in the kgdb
      core.  The arch specific stub should always set the
      kgdb_cpu_doing_single_step correctly if it is single stepping.  This
      allows kgdb to correctly process an instruction steps if ptrace
      happens to be requesting an instruction step over a system call.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      d7161a65
  7. 26 8月, 2008 3 次提交
  8. 31 7月, 2008 1 次提交
    • J
      [MIPS] kgdb: add arch support for the kernel's kgdb core · 88547001
      Jason Wessel 提交于
      The new kgdb architecture specific handler registers and unregisters
      dynamically for exceptions depending on when you configure a kgdb I/O
      driver.
      
      Aside from initializing the exceptions earlier in the boot process,
      kgdb should have no impact on a device when it is compiled in so long
      as an I/O module is not configured for use.
      
      There have been quite a number of contributors during the existence of
      this patch (see arch/mips/kernel/kgdb.c).  Most recently Jason
      re-wrote the mips kgdb logic to use the die notification handlers.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      88547001