[CRIU] custom initialization during restore

Pavel Emelyanov xemul at parallels.com
Wed Aug 12 00:32:56 PDT 2015


On 08/11/2015 09:12 PM, CRIU criu wrote:
> Alright. Let's say we do "LD_PRELOAD=/lib/libcriume.so ./process_to_be_checkpointed arg1 arg2" with
> libcriume.so containing function pre_restore_plugin().

Well, maybe the criu_hooks[] array would be a better approach, but overall -- yes.

> You are suggesting that criu code will parse ELF libcriume.so to get address of the symbol
> "pre_restore_plugin" and look at calculate the load address looking at /proc/<pid>/maps? 

Probably vice-versa, first criu will find libcriume.so in maps, then will look at the
binary over there and get the required symbol. And on restore the detection of libcruime
will come from images.

And, just to be 100% correct -- right now CRIU doesn't do it, patching is required.

> Let me know if my understanding is correct. Thanks!

Overall -- yes.

-- Pavel



More information about the CRIU mailing list