Re: [Qemu-devel] FD passing for chardevs and chardev backend multiplexing

2015-12-09 Thread Paolo Bonzini
On 09/12/2015 12:19, Daniel P. Berrange wrote: > > > Now in practice this doesn't work, because qmp_chardev_open_file() > > > passes the O_CREAT|O_TRUNC flags in, which means the qemu_open() > > > call will fail when using the pipe FD pased in via fdsets. > > > > Is it just the O_TRUNC that is f

Re: [Qemu-devel] FD passing for chardevs and chardev backend multiplexing

2015-12-09 Thread Daniel P. Berrange
On Tue, Dec 08, 2015 at 10:04:55AM -0700, Eric Blake wrote: > On 12/08/2015 07:59 AM, Daniel P. Berrange wrote: > > > So for this my plan is to stop using the QEMU 'file' backend for char > > devs and instead pass across a pre-opened file descriptor, connected > > to virtlogd. There is no "officia

Re: [Qemu-devel] FD passing for chardevs and chardev backend multiplexing

2015-12-08 Thread Eric Blake
On 12/08/2015 07:59 AM, Daniel P. Berrange wrote: > So for this my plan is to stop using the QEMU 'file' backend for char > devs and instead pass across a pre-opened file descriptor, connected > to virtlogd. There is no "officially documented" way to pass in a > file descriptor to QEMU chardevs, b

[Qemu-devel] FD passing for chardevs and chardev backend multiplexing

2015-12-08 Thread Daniel P. Berrange
Historically libvirt has connected stdout & stderr from QEMU directly to a plain file (/var/log/libvirt/qemu/$GUESTNAME.log). This has worked well enough in general, but is susceptible to a guest denial of service if the guest can cause QEMU to spew messages to stderr. There are enough places in Q