Re: [PATCH v2] virtio_balloon: don't push uninitialized buffers to stats virtqueue

2017-03-23 Thread Michael S. Tsirkin
On Thu, Mar 23, 2017 at 08:04:18AM +0100, Ladi Prosek wrote: > When init_vqs runs, virtio_balloon.stats is either uninitialized or > contains stale values. The host updates its state with garbage data > because it has no way of knowing that this is just a marker buffer > used for signaling. > >

Re: [REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest

2017-03-23 Thread Michael S. Tsirkin
On Thu, Mar 23, 2017 at 03:19:07PM +, Richard W.M. Jones wrote: > On Thu, Mar 23, 2017 at 01:13:50PM +0800, Jason Wang wrote: > > >From 312859b596e83a2164a8430343d31fce2a5ad808 Mon Sep 17 00:00:00 2001 > > From: Jason Wang > > Date: Thu, 23 Mar 2017 13:07:16 +0800 > >

Re: [PATCH] virtio_balloon: prevent uninitialized variable use

2017-03-23 Thread Denis V. Lunev
On 03/23/2017 06:17 PM, Arnd Bergmann wrote: > The latest gcc-7.0.1 snapshot reports a new warning: > > virtio/virtio_balloon.c: In function 'update_balloon_stats': > virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in > this function [-Werror=uninitialized] >

Re: [REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest

2017-03-23 Thread Richard W.M. Jones
On Thu, Mar 23, 2017 at 01:13:50PM +0800, Jason Wang wrote: > >From 312859b596e83a2164a8430343d31fce2a5ad808 Mon Sep 17 00:00:00 2001 > From: Jason Wang > Date: Thu, 23 Mar 2017 13:07:16 +0800 > Subject: [PATCH] virtio_pci: fix out of bound access for msix_names > >

[PATCH] virtio_balloon: prevent uninitialized variable use

2017-03-23 Thread Arnd Bergmann
The latest gcc-7.0.1 snapshot reports a new warning: virtio/virtio_balloon.c: In function 'update_balloon_stats': virtio/virtio_balloon.c:258:26: error: 'events[2]' is used uninitialized in this function [-Werror=uninitialized] virtio/virtio_balloon.c:260:26: error: 'events[3]' is used

Re: [REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest

2017-03-23 Thread Christoph Hellwig
On Thu, Mar 23, 2017 at 01:13:50PM +0800, Jason Wang wrote: > > > On 2017年03月23日 08:30, Laura Abbott wrote: >> Hi, >> >> Fedora has received multiple reports of crashes when running >> 4.11 as a guest >> >> https://bugzilla.redhat.com/show_bug.cgi?id=1430297 >>

[PATCH v2] virtio_balloon: don't push uninitialized buffers to stats virtqueue

2017-03-23 Thread Ladi Prosek
When init_vqs runs, virtio_balloon.stats is either uninitialized or contains stale values. The host updates its state with garbage data because it has no way of knowing that this is just a marker buffer used for signaling. This patch updates the stats before pushing the initial buffer. An