Re: [Qemu-devel] [PATCH v2 1/4] display: ensure qxl log_buf is a nul terminated string

2019-01-22 Thread Daniel P . Berrangé
On Mon, Jan 21, 2019 at 10:45:45AM +, Stefan Hajnoczi wrote: > On Fri, Jan 18, 2019 at 05:31:00PM +, Daniel P. Berrangé wrote: > > diff --git a/hw/display/qxl.c b/hw/display/qxl.c > > index 8e9a65e75b..eefdf4baac 100644 > > --- a/hw/display/qxl.c > > +++ b/hw/display/qxl.c > > @@ -1763,7 +1

Re: [Qemu-devel] [PATCH v2 1/4] display: ensure qxl log_buf is a nul terminated string

2019-01-21 Thread Stefan Hajnoczi
On Fri, Jan 18, 2019 at 05:31:00PM +, Daniel P. Berrangé wrote: > diff --git a/hw/display/qxl.c b/hw/display/qxl.c > index 8e9a65e75b..eefdf4baac 100644 > --- a/hw/display/qxl.c > +++ b/hw/display/qxl.c > @@ -1763,7 +1763,8 @@ async_common: > qxl_set_mode(d, val, 0); > break;

Re: [Qemu-devel] [PATCH v2 1/4] display: ensure qxl log_buf is a nul terminated string

2019-01-20 Thread Gerd Hoffmann
> case QXL_IO_LOG: > -trace_qxl_io_log(d->id, d->ram->log_buf); > +d->ram->log_buf[sizeof(d->ram->log_buf) - 1] = '\0'; > +trace_qxl_io_log(d->id, (const char *)d->ram->log_buf); > if (d->guestdebug) { Reviewed-by: Gerd Hoffmann

Re: [Qemu-devel] [PATCH v2 1/4] display: ensure qxl log_buf is a nul terminated string

2019-01-18 Thread Daniel P . Berrangé
On Fri, Jan 18, 2019 at 11:40:29AM -0600, Eric Blake wrote: > On 1/18/19 11:31 AM, Daniel P. Berrangé wrote: > > The QXL_IO_LOG command allows the guest to send log messages to the host > > via a buffer in the QXLRam struct. QEMU prints these to the console if > > the qxl 'guestdebug' option is set

Re: [Qemu-devel] [PATCH v2 1/4] display: ensure qxl log_buf is a nul terminated string

2019-01-18 Thread Eric Blake
On 1/18/19 11:31 AM, Daniel P. Berrangé wrote: > The QXL_IO_LOG command allows the guest to send log messages to the host > via a buffer in the QXLRam struct. QEMU prints these to the console if > the qxl 'guestdebug' option is set to non-zero. It will also feed them > to the trace subsystem if any

[Qemu-devel] [PATCH v2 1/4] display: ensure qxl log_buf is a nul terminated string

2019-01-18 Thread Daniel P . Berrangé
The QXL_IO_LOG command allows the guest to send log messages to the host via a buffer in the QXLRam struct. QEMU prints these to the console if the qxl 'guestdebug' option is set to non-zero. It will also feed them to the trace subsystem if any backends are built-in. In both cases the log_buf data