This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

kretprobes vs __switch_to


> The second one that failed was 'kernel.function("__switch_to").return'.
> This one is a problem with kretprobes only, as all of my other probes in
> __switch_to behaved just fine, even in the middle of the function.
> Running this gave "Kernel BUG at kprobes:449" (the full dump is included
> below).  The line mentioned is in trampoline_probe_handler:
> 
>     BUG_ON(!orig_ret_address || (orig_ret_address ==
> trampoline_address));
> 
> It seems pretty obvious that the actions taken in __switch_to would
> conflict with the way the trampoline works.  I don't know if it's
> possible to make kretprobes work on this function - if not, it should be
> blacklisted.

It's not clear to me why this fails.  It's actually some assembly code in
the switch_to macro (used in context_switch) that changes stacks, before it
calls __switch_to.  __switch_to is entered on the new stack and it seems to
me that kretprobes ought to be able to handle it normally.  Clearly I'm
missing something.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]