Friday, 2021-11-12

kata-irc-bot<shuo.chen> does anyone know whether qemu will zero out the memory before providing the memory to the VM? I wonder if we create VM multiple times from a single host, whether the latter VM can read the stale memory data from previous VM?00:56
kata-irc-bot<bergwolf> No, the latter one cannot read  the previous one's memory. The host kernel ensures that any memory returned by mmap or brk will be zeroed. otherwise it would be a kernel security issue.01:40
kata-irc-bot<liuj97> Actually the memory may be zeroed multiple times, 1. when qemu allocates memory from host kernel, the host kernel will zero out the memory 2. when guest os kernel initialize the guest vm, it zero out all guest memory 3. when application allocates memory from the guest kernel, it also zeroes out the memory01:46
kata-irc-bot<shuo.chen> Gotcha. How about the cpu cache? Is it possible that one vm can read previous vm’s cpu cache?02:36
kata-irc-bot<liuj97> memory is the owner of data, cache will be synchronized with memory02:48

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!