<div dir="ltr">Can we also use the plugin to call a specific function in the target process? If yes, does it have to be a fixed address or the plugin could be made aware of the function address dynamically (linking?)</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 11, 2015 at 11:27 AM, CRIU criu <span dir="ltr"><<a href="mailto:criuport@gmail.com" target="_blank">criuport@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks! Let me take a look.<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 11, 2015 at 6:01 AM, Pavel Emelyanov <span dir="ltr"><<a href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>On 06/11/2015 05:06 AM, CRIU criu wrote:<br>
> Hi,<br>
><br>
> How can I add custom initialization code to restorer before unmap and sigreturn?<br>
> I'm trying to checkpoint /restore a single Android process. For external dependencies, I<br>
> need to initialize Java objects collected as a part of memory dump by CRIU. The<br>
> initialization code involves making a bunch of syscalls. Can I do this by creating a<br>
> custom restorer blob or inside cr_restore_tasks() in cr-restore.c? Thanks!<br>
<br>
</div></div>Hm :) Nice request. Right now there's no such ability in CRIU and I don't<br>
see _easy_ solution. Complex solution can be plugin, that gets loaded into<br>
restorer blob and that's called at the very end of restorer, but this would<br>
require non-trivial preparation of the plugin itself. We've played with<br>
such things before, you can dig deep into the pie/ code and into the<br>
compel project (<a href="https://github.com/xemul/compel" rel="noreferrer" target="_blank">https://github.com/xemul/compel</a>) for details :)<br>
<span><font color="#888888"><br>
-- Pavel<br>
<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>