Re: backtrace failure on x86_64 and x86 in 2.6.33/34 kernels due to "thread_return" removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- "Dave Anderson" <anderson@xxxxxxxxxx> wrote:

> I've got a fix for x86_64 -- which have always depended on the existence of
> the "thread_return" label.  But I note that x86 backtraces also are not working,
> which I'll take a look at today.
 
As it turns out, the x86 backtrace failures in 2.6.33/34 are caused by a different
kprobes-related commit, which moved the system_call assembly function to the
.kprobes.text section:

  commit a00e817f42663941ea0aa5f85a9d1c4f8b212839
  Author: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
  Date:   Tue Sep 8 12:47:55 2009 -0400

    kprobes/x86-32: Move irq-exit functions to kprobes section
    
    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: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
    Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
    Cc: Ananth N Mavinakayanahalli <ananth@xxxxxxxxxx>
    Cc: Jim Keniston <jkenisto@xxxxxxxxxx>
    Cc: Ingo Molnar <mingo@xxxxxxx>
    LKML-Reference: <20090908164755.24050.81182.stgit@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>

  ... [ snip ] ... 
  
  @@ -513,6 +521,10 @@ sysexit_audit:
          PTGS_TO_GS_EX
   ENDPROC(ia32_sysenter_target)
   
  +/*
  + * syscall stub including irq exit should be protected against kprobes
  + */
  +       .pushsection .kprobes.text, "ax"
          # system call handler stub
   ENTRY(system_call)
          RING0_INT_FRAME                 # can't unwind into user space anyway
  @@ -705,6 +717,10 @@ syscall_badsys:
          jmp resume_userspace
   END(syscall_badsys)
          CFI_ENDPROC
  +/*
  + * End of kprobes section
  + */
  +       .popsection
 
I should have a fix tomorrow (if that's the only issue)...

Dave

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux