Re: [Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-10-18 Thread Daniel P . Berrangé
On Fri, Oct 18, 2019 at 11:31:15AM +0200, Thomas Huth wrote: > On 22/01/2019 19.10, Eric Blake wrote: > > On 1/22/19 11:23 AM, Daniel P. Berrangé wrote: > > > >> > On this point though, does anyone know of any platforms we support[1], > or are likely to support in future, where 'strerror

Re: [Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-10-18 Thread Thomas Huth
On 22/01/2019 19.10, Eric Blake wrote: > On 1/22/19 11:23 AM, Daniel P. Berrangé wrote: > >> On this point though, does anyone know of any platforms we support[1], or are likely to support in future, where 'strerror' is *not* thread safe ? >>> >>> I'm not coming up with one, and I t

Re: [Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-01-22 Thread Daniel P . Berrangé
On Fri, Jan 18, 2019 at 11:50:39AM -0600, Eric Blake wrote: > On 1/18/19 11:31 AM, Daniel P. Berrangé wrote: > > The '%m' format specifier instructs glibc's printf() implementation to > > insert the contents of strerror(errno). > > That is a glibc-only extension in printf(), but mandatory (and sup

Re: [Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-01-22 Thread Eric Blake
On 1/22/19 11:23 AM, Daniel P. Berrangé wrote: > >>> On this point though, does anyone know of any platforms we support[1], >>> or are likely to support in future, where 'strerror' is *not* thread >>> safe ? >> >> I'm not coming up with one, and I think the problem is independent of >> this serie

Re: [Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-01-22 Thread Daniel P . Berrangé
On Tue, Jan 22, 2019 at 11:19:42AM -0600, Eric Blake wrote: > On 1/22/19 8:32 AM, Daniel P. Berrangé wrote: > > >>> +++ b/hw/vfio/pci.c > >>> @@ -2581,7 +2581,7 @@ static void vfio_populate_device(VFIOPCIDevice > >>> *vdev, Error **errp) > >>> ret = ioctl(vdev->vbasedev.fd, VFIO_DEVICE_GET_I

Re: [Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-01-22 Thread Eric Blake
On 1/22/19 8:32 AM, Daniel P. Berrangé wrote: >>> +++ b/hw/vfio/pci.c >>> @@ -2581,7 +2581,7 @@ static void vfio_populate_device(VFIOPCIDevice *vdev, >>> Error **errp) >>> ret = ioctl(vdev->vbasedev.fd, VFIO_DEVICE_GET_IRQ_INFO, &irq_info); >>> if (ret) { >>> /* This can fail f

Re: [Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-01-18 Thread Alex Williamson
On Fri, 18 Jan 2019 11:50:39 -0600 Eric Blake wrote: > On 1/18/19 11:31 AM, Daniel P. Berrangé wrote: > > The '%m' format specifier instructs glibc's printf() implementation to > > insert the contents of strerror(errno). > > That is a glibc-only extension in printf(), but mandatory (and suppor

Re: [Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-01-18 Thread Eric Blake
On 1/18/19 11:31 AM, Daniel P. Berrangé wrote: > The '%m' format specifier instructs glibc's printf() implementation to > insert the contents of strerror(errno). That is a glibc-only extension in printf(), but mandatory (and supported in ALL platforms) in syslog(). However, you are correct that:

[Qemu-devel] [PATCH v2 3/4] trace: forbid use of %m in trace event format strings

2019-01-18 Thread Daniel P . Berrangé
The '%m' format specifier instructs glibc's printf() implementation to insert the contents of strerror(errno). This is not something that should ever be used in trace-events files because several of the backends do not use the format string and so this error information is invisible to them. The er