This is the mail archive of the systemtap@sources.redhat.com 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]

Re: Notes from the systemtap BOF


Masami Hiramatsu wrote:
> If CPU B stacks the EIP, then yes it cause invalid instruction error.
> But before insertion, djprobe has checked whether the all CPUs are through
> the djprobe's kprobe bypass.

Mathieu seems to be right on this one. You can't make any guarantees on
the presence of the EIP on another process' stack. So from what I can
make of it, usage of the djprobe mechanism may actually result in a lot
of time spent figuring out whether the error was caused by the insertion
itself ...

It looks like the only way to safely use jmps instead of int3s is to
actually insert nops in the region you intend to insert jmps ... which
is very much a case for markers.

> Or, should we consider the idea that we use the simple space that 
> contains just 5 nops(*) ?
> 
> (*) like below
> #define __JMP_POINT(tname) {asm volatile( ".global" #name "; "\
>                                          #name ":nop;nop;nop;nop;nop;");}
> #define JMP_POINT(name) __JMP_POINT(name##_tag)


hmm... yes, this is what makers are about.

Mathieu: maybe you could post the preliminary bit of code you had written
during OLS for markers?

Thanks,

Karim
-- 
Author, Speaker, Developer, Consultant
Pushing Embedded and Real-Time Linux Systems Beyond the Limits
http://www.opersys.com || karim@opersys.com || 1-866-677-4546


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