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: Hitachi djprobe mechanism


Hi Masami,
	The same paper you have mentioned below talks 
about overwriting a single instruction at the instrumentation
point as opposed to what djprobe is doing which is
replacing multiple instruction( in order to overwrite
5 byte jmp instruction).

Having to replace multiple instructions in order to
insert a long jump instruction is a very dangerous thing
as some processes on some cpu might have been preempted
out in the middle of those instructions and are expected
to continue from the middle of that instruction which is now
a data for overwritten jump instruction.

I think that overwriting just a single-instruction
is always hazard-free and should be followed in djprobe. 
The paper clearly explains how to achieve this using what
is known as springboard technique.

Please let me know your thoughts on this.

-thanks,
Anil
 

>-----Original Message-----
>From: systemtap-owner@sources.redhat.com 
>[mailto:systemtap-owner@sources.redhat.com] On Behalf Of 
>Masami Hiramatsu
>Sent: Wednesday, July 27, 2005 6:02 AM
>To: Roland McGrath
>Cc: Richard J Moore; SystemTAP; sugita@sdl.hitachi.co.jp; 
>Satoshi Oshima
>Subject: Re: Hitachi djprobe mechanism
>
>Hi, Roland
>
>Roland McGrath wrote:
>>>  I think Kerninst is similar in effect to djprobe. both of them copy
>>>original code to a buffer and jump to the buffer.
>>>  However I think that the most unique feature of djprobe is use of
>>>"bypass" route to safely insert code on SMP.
>>>  I cannot find SMP safety mechanism like "bypass" in kerninst papers
>>>yet.
>> 
>> 
>> If by this you mean inserting an int3 while writing the rest 
>of the jmp
>> instruction and then overwriting the first byte when the 
>rest is in place,
>> I recall reading about that in some kerninst paper to be sure.
>
>Thanks a lot.
>Finally, I found it in page.9 of the OSDI paper:
>"Fine-Grained Dynamic Instrumentation of Commodity Operating 
>System Kernels",
>Ariel Tamches and Barton P. Miller, OSDI, Feb 1999.
>
>Actually, it seems to describe a similar thing.
>
>-- 
>Masami HIRAMATSU
>2nd Research Dept.
>Hitachi, Ltd., Systems Development Laboratory
>E-mail: hiramatu@sdl.hitachi.co.jp
>
>
>
>


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