Displaying 20 results from an estimated 2000 matches similar to: "[patch] virtio_console: use snprintf() for safety"
2015 May 08
4
[patch v2] virtio_console: silence a static checker warning
My static checker complains that this sprintf() can overflow but really
it can't. Just silence the warning by using snprintf().
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
v2: the overflow is not possible so just leave the buffer size alone and
silence the warning with snprintf().
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index
2015 May 08
4
[patch v2] virtio_console: silence a static checker warning
My static checker complains that this sprintf() can overflow but really
it can't. Just silence the warning by using snprintf().
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
---
v2: the overflow is not possible so just leave the buffer size alone and
silence the warning with snprintf().
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index
2015 May 08
1
[patch v2] virtio_console: silence a static checker warning
Am 08.05.2015 11:16, schrieb Dan Carpenter:
> My static checker complains that this sprintf() can overflow but really
> it can't. Just silence the warning by using snprintf().
>
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
> ---
> v2: the overflow is not possible so just leave the buffer size alone and
> silence the warning with snprintf().
>
2013 Jan 17
4
[PATCH] virtio_console: Use virtio device index to generate port name
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
Use virtio device index for creating unique device port names.
Current index allocation in virtio is based on a monotonically
increasing variable "index". A better handling of this is to
use device index which is allocated by ida.
Signed-off-by: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
---
2013 Jan 17
4
[PATCH] virtio_console: Use virtio device index to generate port name
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
Use virtio device index for creating unique device port names.
Current index allocation in virtio is based on a monotonically
increasing variable "index". A better handling of this is to
use device index which is allocated by ida.
Signed-off-by: Sjur Br?ndeland <sjur.brandeland at stericsson.com>
---
2015 May 08
0
[patch v2] virtio_console: silence a static checker warning
On Fri, May 08, 2015 at 11:30:09AM +0200, walter harms wrote:
>
>
> Am 08.05.2015 11:16, schrieb Dan Carpenter:
> > My static checker complains that this sprintf() can overflow but really
> > it can't. Just silence the warning by using snprintf().
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
> > ---
> > v2: the
2015 May 08
0
[patch v2] virtio_console: silence a static checker warning
On (Fri) 08 May 2015 [11:30:09], walter harms wrote:
>
>
> Am 08.05.2015 11:16, schrieb Dan Carpenter:
> > My static checker complains that this sprintf() can overflow but really
> > it can't. Just silence the warning by using snprintf().
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
> > ---
> > v2: the overflow is not
2015 May 08
1
[patch v2] virtio_console: silence a static checker warning
Am 08.05.2015 11:56, schrieb Amit Shah:
> On (Fri) 08 May 2015 [11:30:09], walter harms wrote:
>>
>>
>> Am 08.05.2015 11:16, schrieb Dan Carpenter:
>>> My static checker complains that this sprintf() can overflow but really
>>> it can't. Just silence the warning by using snprintf().
>>>
>>> Signed-off-by: Dan Carpenter <dan.carpenter
2015 May 08
1
[patch v2] virtio_console: silence a static checker warning
Am 08.05.2015 11:56, schrieb Amit Shah:
> On (Fri) 08 May 2015 [11:30:09], walter harms wrote:
>>
>>
>> Am 08.05.2015 11:16, schrieb Dan Carpenter:
>>> My static checker complains that this sprintf() can overflow but really
>>> it can't. Just silence the warning by using snprintf().
>>>
>>> Signed-off-by: Dan Carpenter <dan.carpenter
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
When we hot unplug a virtserialport and then try to hot plug again,
it fails:
(qemu) chardev-add socket,id=serial0,path=/tmp/serial0,server,nowait
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
chardev=serial0,id=serial0,name=serial0
(qemu) device_del serial0
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
When we hot unplug a virtserialport and then try to hot plug again,
it fails:
(qemu) chardev-add socket,id=serial0,path=/tmp/serial0,server,nowait
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
chardev=serial0,id=serial0,name=serial0
(qemu) device_del serial0
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
When we hot unplug a virtserialport and then try to hot plug again,
it fails:
(qemu) chardev-add socket,id=serial0,path=/tmp/serial0,server,nowait
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
chardev=serial0,id=serial0,name=serial0
(qemu) device_del serial0
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
When we hot unplug a virtserialport and then try to hot plug again,
it fails:
(qemu) chardev-add socket,id=serial0,path=/tmp/serial0,server,nowait
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
chardev=serial0,id=serial0,name=serial0
(qemu) device_del serial0
(qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
Hi,
Sorry for the late reply.
On (Thu) 12 Jan 2012 [09:20:07], zanghongyong at huawei.com wrote:
> From: Hongyong Zang <zanghongyong at huawei.com>
>
> Add setup_port_vq(). Create the io ports' vqs when add_port.
Can you describe the changes in more detail, please?
> Signed-off-by: Hongyong Zang <zanghongyong at huawei.com>
> ---
>
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
Hi,
Sorry for the late reply.
On (Thu) 12 Jan 2012 [09:20:07], zanghongyong at huawei.com wrote:
> From: Hongyong Zang <zanghongyong at huawei.com>
>
> Add setup_port_vq(). Create the io ports' vqs when add_port.
Can you describe the changes in more detail, please?
> Signed-off-by: Hongyong Zang <zanghongyong at huawei.com>
> ---
>
2019 Nov 13
0
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
On Wed, Nov 13, 2019 at 04:00:56PM +0100, Laurent Vivier wrote:
> When we hot unplug a virtserialport and then try to hot plug again,
> it fails:
>
> (qemu) chardev-add socket,id=serial0,path=/tmp/serial0,server,nowait
> (qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
> chardev=serial0,id=serial0,name=serial0
> (qemu) device_del serial0
>
2019 Dec 03
0
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
On Thu, 2019-11-14 at 13:25 +0100, Laurent Vivier wrote:
> When we hot unplug a virtserialport and then try to hot plug again,
> it fails:
>
> (qemu) chardev-add socket,id=serial0,path=/tmp/serial0,server,nowait
> (qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
> chardev=serial0,id=serial0,name=serial0
> (qemu) device_del serial0
> (qemu)
2018 Apr 20
0
[PATCH 3/6] virtio_console: free buffers after reset
Console driver is out of spec. The spec says:
A driver MUST NOT decrement the available idx on a live
virtqueue (ie. there is no way to ?unexpose? buffers).
and it does exactly that by trying to detach unused buffers
without doing a device reset first.
Defer detaching the buffers until device unplug.
Of course this means we might get an interrupt for
a vq without an attached port now. Handle
2019 Dec 03
1
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
On Tue, Dec 03, 2019 at 03:46:50PM +0100, Amit Shah wrote:
> On Thu, 2019-11-14 at 13:25 +0100, Laurent Vivier wrote:
> > When we hot unplug a virtserialport and then try to hot plug again,
> > it fails:
> >
> > (qemu) chardev-add socket,id=serial0,path=/tmp/serial0,server,nowait
> > (qemu) device_add virtserialport,bus=virtio-serial0.0,nr=2,\
> >
2010 Sep 02
14
[PATCH 00/14] virtio: console: Hot-unplug fixes
Hey Rusty,
These are the patches that rework a few bits to make hot-unplug while
ports are open not crash apps (or kernels).
The problem is when hot-unplug is performed when a port is open, the
cdev struct is kept around by the file pointers and when the app later
does a 'close', things go boom-boom.
This patch series makes sure port as well as device hot-unplug is now
safe to perform