[panda-users] Rehosting?

Brendan Dolan-Gavitt brendandg at nyu.edu
Sat Dec 2 17:32:33 EST 2017


This is unlikely to work because PANDA's record/replay doesn't update the
internal state of peripherals as it runs – so resuming from a snapshot
taken in the middle of a replay will have a mismatch between the CPU/RAM
state and the peripheral state. (E.g., imagine that the first half of the
recording wrote to a file. When you restore to a snapshot in the middle of
the replay, the virtual hard drive won't have that file, because the replay
didn't actually make any modifications to the hard drive).

That said, you can *try* to make this using QEMU's migration functionality:

>From the monitor, partway through replay:

(qemu) migrate "exec:cat > foo-snp"

And then you can do:

qemu-system-i386 -incoming "exec:cat < foo-snp"

to load the snapshot.

This person seems to have done something similar (though they created the
-snp using the scissors plugin rather than the migrate command). Apparently
they were able to get the VM to resume, but network didn't work and the
machine hung after a while. I would expect this to be kind of the best case
scenario for what you're hoping to accomplish:

https://github.com/panda-re/panda/issues/232

You may have better luck using QEMU's built-in record/replay functionality
for this. Unlike ours, it does record peripheral state (more precisely: the
recording boundary is outside the peripherals, so it captures e.g. mouse
movements / network packets, whereas ours records the effect of the mouse
controller / NIC on the CPU/RAM).

-Brendan

On Sat, Dec 2, 2017 at 2:26 PM, David Manouchehri <
david.manouchehri at riseup.net> wrote:

> Is there a PANDA 2 plugin similar to the former rehosting?
>
> https://github.com/panda-re/panda/blob/panda1/qemu/panda_
> plugins/rehosting/USAGE.md
>
> My goal was to resume a replay log (.rr) at an arbitrary instrcount/address.
> e.g. after running the following commands you could connect via VNC and
> interact with the machine again.
>
> root at 88fbb62481bb:~# /panda/build/i386-softmmu/qemu-system-i386 -hda
> mobile_x86.qcow2 -m 256 -monitor stdio -net nic,model=e1000 -net user
> -replay chrysaor -panda memsavep:instrcount=1,file=memory.dd # Dump the
> memory
>
> root at 88fbb62481bb:~# /panda/build/i386-softmmu/qemu-system-i386 -hda
> mobile_x86.qcow2 -m 256 -monitor stdio -net nic,model=e1000 -net user
> -panda rehosting:kernel=memory.dd,base=0x0,entry=0xb6e90ab7 -vnc
> :0,password # Resume the VM
>
> Thanks,
>
> David Manouchehri
>
> _______________________________________________
> panda-users mailing list
> panda-users at mit.edu
> http://mailman.mit.edu/mailman/listinfo/panda-users
>
>


-- 
Brendan Dolan-Gavitt
Assistant Professor, Department of Computer Science and Engineering
NYU Tandon School of Engineering
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/panda-users/attachments/20171202/7a252cf1/attachment.html


More information about the panda-users mailing list