• V
    [PATCH] kdump: x86_64 save cpu registers upon crash · ec9ce0db
    Vivek Goyal 提交于
    - Saving the cpu registers of all cpus before booting in to the crash
      kernel.
    
    - crash_setup_regs will save the registers of the cpu on which panic has
      occured.  One of the concerns ppc64 folks raised is that after capturing the
      register states, one should not pop the current call frame and push new one.
       Hence it has been inlined.  More call frames later get pushed on to stack
      (machine_crash_shutdown() and machine_kexec()), but one will not want to
      backtrace those.
    
    - Not very sure about the CFI annotations.  With this patch I am getting
      decent backtrace with gdb.  Assuming, compiler has generated enough
      debugging information for crash_kexec().  Coding crash_setup_regs() in pure
      assembly makes it tricky because then it can not be inlined and we don't
      want to return back after capturing register states we don't want to pop
      this call frame.
    
    - Saving the non-panicing cpus registers will be done in the NMI handler
      while shooting down them in machine_crash_shutdown.
    
    - Introducing CRASH_DUMP option in Kconfig for x86_64.
    Signed-off-by: NMurali M Chakravarthy <muralim@in.ibm.com>
    Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
    Cc: Andi Kleen <ak@muc.de>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: NAndrew Morton <akpm@osdl.org>
    Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
    ec9ce0db
Kconfig 14.8 KB