Re: [DynInst_API:] ppcle detach removes snippets


Date: Fri, 16 Aug 2019 20:44:06 +0000
From: Barton Miller <bart@xxxxxxxxxxx>
Subject: Re: [DynInst_API:] ppcle detach removes snippets

Makes sense.  Good catch.

--bart

On 2019-08-16 3:19 PM, Xiaozhu Meng wrote:
Stan reported this problem as issue 634 (https://github.com/dyninst/dyninst/issues/634) yesterday. I am able to reproduce this problem and identify what caused the problem. 

The problem here is that during dynamic instrumentation by attaching to the mutatee process, instrumentation seems to be removed by calling BPatch_process::detach(), and this problem only shows up on power, not x86-64 or ARM.

It turns out that in this case, a trap springboard is used to transfer program execution from original code to instrumentation. In dynamic instrumentation, all trap instructions generated by Dyninst are also considered as software break points by Dyninst, and Dyninst decides to remove all software break points when it detaches from the mutatee.

I am not sure how many and when software break points are used in Dyninst, but a springboard trap does not serve the purpose as a software break point and should not be removed during detaching. 

So, my plan is to simply generate a trap instruction when a trap springboard is needed, without registering this trap as a software break point.

Let me know if there are any concerns.

Thanks,

âXiaozhu


On Jul 16, 2019, at 4:26 PM, Stan Cox <scox@xxxxxxxxxx> wrote:

Ah good point:
 POWER8 (architected), altivec supported

<smoke-test.tar>_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api


_______________________________________________
Dyninst-api mailing list
Dyninst-api@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api
[← Prev in Thread] Current Thread [Next in Thread→]