<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 17, 2021 at 7:50 PM Christian Schoenebeck <<a href="mailto:qemu_oss@crudebyte.com">qemu_oss@crudebyte.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mittwoch, 17. März 2021 11:05:32 CET Stefan Hajnoczi wrote:<br>
> On Fri, Dec 18, 2020 at 05:39:34PM +0800, Jiachen Zhang wrote:<br>
> > Thanks for the suggestions. Actually, we choose to save all state<br>
> > information to QEMU because a virtiofsd has the same lifecycle as its<br>
> > QEMU master. However, saving things to a file do avoid communication with<br>
> > QEMU, and we no longer need to increase the complexity of vhost-user<br>
> > protocol. The suggestion to save fds to the systemd is also very<br>
> > reasonable<br>
> > if we don't consider the lifecycle issues, we will try it.<br>
> <br>
> Hi,<br>
> We recently discussed crash recovery in the virtio-fs bi-weekly call and<br>
> I read some of this email thread because it's a topic I'm interested in.<br>
<br>
I just had a quick fly over the patches so far. Shouldn't there be some kind <br>
of constraint for an automatic reconnection feature after a crash to prevent <br>
this being exploited by ROP brute force attacks?<br>
<br>
E.g. adding some (maybe continuously increasing) delay and/or limiting the <br>
amount of reconnects within a certain time frame would come to my mind.<br>
<br>
Best regards,<br>
Christian Schoenebeck<br>
<br>
<br></blockquote><div><br></div><div><br></div><div>Thanks, Christian. I am still trying to figure out the details of the ROP attacks. </div><div><br></div><div>However, QEMU's vhost-user reconnection is based on chardev socket reconnection. The socket reconnection can be enabled by the "--chardev socket,...,reconnect=N" in QEMU command options, in which N means QEMU will try to connect the disconnected socket every N seconds. We can increase N to increase the reconnect delay. If we want to change the reconnect delay dynamically, I think we should change the chardev socket reconnection code. It is a more generic mechanism than vhost-user-fs and vhost-user backend.</div><div><br></div><div>By the way, I also considered the socket reconnection delay time in the performance aspect. As the reconnection delay increase, if an application in the guest is doing I/Os, it will suffer larger tail latency. And for now, the smallest delay is 1 second, which is rather large for high-performance virtual I/O devices today. I think maybe a more performant and safer reconnect delay adjustment mechanism should be considered in the future. What are your thoughts?</div><div><br></div><div><br></div><div>Jiachen</div><div><br></div><div> </div></div></div>