search for: bad_r

Displaying 20 results from an estimated 140 matches for "bad_r".

Did you mean: bader
2023 May 26
1
[PATCH] virtio_ring: validate used buffer length
...ivers/virtio/virtio_ring.c @@ -15,6 +15,9 @@ #include <linux/spinlock.h> #include <xen/xen.h> +static bool force_used_validation = false; +module_param(force_used_validation, bool, 0444); + #ifdef DEBUG /* For development, we want to crash whenever the ring is screwed. */ #define BAD_RING(_vq, fmt, args...) \ @@ -105,6 +108,9 @@ struct vring_virtqueue_split { struct vring_desc_state_split *desc_state; struct vring_desc_extra *desc_extra; + /* Maximum in buffer length, NULL means no used validation */ + u32 *buflen; + /* DMA address and size information */ dma_addr_t...
2013 Jun 19
3
[PATCH] virtio-spec: add field for scsi command size
Il 19/06/2013 10:24, Michael S. Tsirkin ha scritto: >> > 2) We introduce VIRTIO_NET_F_ANY_LAYOUT and VIRTIO_BLK_F_ANY_LAYOUT >> > specifically for net and block (note the new names). So why not a transport feature? Is it just because the SCSI commands for virtio-blk also require a config space field? Sorry if I missed this upthread. Paolo >> > 3) I note the
2013 Jun 19
3
[PATCH] virtio-spec: add field for scsi command size
Il 19/06/2013 10:24, Michael S. Tsirkin ha scritto: >> > 2) We introduce VIRTIO_NET_F_ANY_LAYOUT and VIRTIO_BLK_F_ANY_LAYOUT >> > specifically for net and block (note the new names). So why not a transport feature? Is it just because the SCSI commands for virtio-blk also require a config space field? Sorry if I missed this upthread. Paolo >> > 3) I note the
2022 Dec 26
4
[PATCH 0/4] virtio-net: don't busy poll for cvq command
Hi all: The code used to busy poll for cvq command which turns out to have several side effects: 1) infinite poll for buggy devices 2) bad interaction with scheduler So this series tries to use sleep + timeout instead of busy polling. Please review. Thanks Changes since RFC: - switch to use BAD_RING in virtio_break_device() - check virtqueue_is_broken() after being woken up - use more_used() instead of virtqueue_get_buf() to allow caller to get buffers afterwards - break the virtio-net device when timeout - get buffer manually since the virtio core check more_used() instead Jason Wang (4...
2013 Jun 20
0
[PATCH] virtio-spec: add field for scsi command size
...o/virtio_ring.c b/drivers/virtio/virtio_ring.c index e82821a..6e5271c 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -45,35 +45,6 @@ #define virtio_wmb(vq) wmb() #endif -#ifdef DEBUG -/* For development, we want to crash whenever the ring is screwed. */ -#define BAD_RING(_vq, fmt, args...) \ - do { \ - dev_err(&(_vq)->vq.vdev->dev, \ - "%s:"fmt, (_vq)->vq.name, ##args); \ - BUG(); \ - } while (0) -/* Caller is supposed to guarantee no reentry. */ -#define START_USE(_vq) \ - do { \ - if ((_vq)->in_use)...
2023 May 31
1
[PATCH] virtio_ring: validate used buffer length
...gt; > > +module_param(force_used_validation, bool, 0444); > > > > > > > + > > > > > > > #ifdef DEBUG > > > > > > > /* For development, we want to crash whenever the ring is screwed. */ > > > > > > > #define BAD_RING(_vq, fmt, args...) \ > > > > > > > @@ -105,6 +108,9 @@ struct vring_virtqueue_split { > > > > > > > struct vring_desc_state_split *desc_state; > > > > > > > struct vring_desc_extra *desc_extra; &g...
2023 May 31
1
[PATCH] virtio_ring: validate used buffer length
...e_param(force_used_validation, bool, 0444); > > > > > > > > + > > > > > > > > #ifdef DEBUG > > > > > > > > /* For development, we want to crash whenever the ring is screwed. */ > > > > > > > > #define BAD_RING(_vq, fmt, args...) \ > > > > > > > > @@ -105,6 +108,9 @@ struct vring_virtqueue_split { > > > > > > > > struct vring_desc_state_split *desc_state; > > > > > > > > struct vring_desc_extra...
2023 Jun 01
1
[PATCH] virtio_ring: validate used buffer length
...e_param(force_used_validation, bool, 0444); > > > > > > > > + > > > > > > > > #ifdef DEBUG > > > > > > > > /* For development, we want to crash whenever the ring is screwed. */ > > > > > > > > #define BAD_RING(_vq, fmt, args...) \ > > > > > > > > @@ -105,6 +108,9 @@ struct vring_virtqueue_split { > > > > > > > > struct vring_desc_state_split *desc_state; > > > > > > > > struct vring_desc_extra...
2023 Jun 01
1
[PATCH] virtio_ring: validate used buffer length
...alidation, bool, 0444); > > > > > > > > > + > > > > > > > > > #ifdef DEBUG > > > > > > > > > /* For development, we want to crash whenever the ring is screwed. */ > > > > > > > > > #define BAD_RING(_vq, fmt, args...) \ > > > > > > > > > @@ -105,6 +108,9 @@ struct vring_virtqueue_split { > > > > > > > > > struct vring_desc_state_split *desc_state; > > > > > > > > > struct vr...
2013 Jun 20
3
[PATCH] virtio-spec: add field for scsi command size
...; index e82821a..6e5271c 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -45,35 +45,6 @@ > #define virtio_wmb(vq) wmb() > #endif > > -#ifdef DEBUG > -/* For development, we want to crash whenever the ring is screwed. */ > -#define BAD_RING(_vq, fmt, args...) \ > - do { \ > - dev_err(&(_vq)->vq.vdev->dev, \ > - "%s:"fmt, (_vq)->vq.name, ##args); \ > - BUG(); \ > - } while (0) > -/* Caller is supposed to guarantee no reentry. */ > -#define START_USE(_vq) \ > - d...
2013 Jun 20
3
[PATCH] virtio-spec: add field for scsi command size
...; index e82821a..6e5271c 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -45,35 +45,6 @@ > #define virtio_wmb(vq) wmb() > #endif > > -#ifdef DEBUG > -/* For development, we want to crash whenever the ring is screwed. */ > -#define BAD_RING(_vq, fmt, args...) \ > - do { \ > - dev_err(&(_vq)->vq.vdev->dev, \ > - "%s:"fmt, (_vq)->vq.name, ##args); \ > - BUG(); \ > - } while (0) > -/* Caller is supposed to guarantee no reentry. */ > -#define START_USE(_vq) \ > - d...
2022 Dec 30
1
[PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue
...ntroduces new bugs around that? at least enumerate them please. > > > > > >> > > > > > >> The current code did: > > > > > >> > > > > > >> 1) check for vq->broken > > > > > >> 2) wakeup during BAD_RING() > > > > > >> > > > > > >> So we won't end up with a never woke up process which should be fine. > > > > > >> > > > > > >> Thanks > > > > > > > > > > > > BTW BAD_RING on r...
2023 Jan 27
1
[PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue
...that? at least enumerate them please. > > > > > > >> > > > > > > >> The current code did: > > > > > > >> > > > > > > >> 1) check for vq->broken > > > > > > >> 2) wakeup during BAD_RING() > > > > > > >> > > > > > > >> So we won't end up with a never woke up process which should be fine. > > > > > > >> > > > > > > >> Thanks > > > > > > > > > > > &g...
2009 May 14
0
[PATCHv6 1/4] virtio: add names to virtqueue struct, mapping from devices to queues.
...ate_queue; diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 5c52369..8cf39d4 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -23,21 +23,30 @@ #ifdef DEBUG /* For development, we want to crash whenever the ring is screwed. */ -#define BAD_RING(_vq, fmt...) \ - do { dev_err(&(_vq)->vq.vdev->dev, fmt); BUG(); } while(0) +#define BAD_RING(_vq, fmt, args...) \ + do { \ + dev_err(&(_vq)->vq.vdev->dev, \ + "%s:"fmt, (_vq)->vq.name, ##args); \ + BUG(); \ + } while (0) /* Caller is suppo...
2009 May 14
0
[PATCHv6 1/4] virtio: add names to virtqueue struct, mapping from devices to queues.
...ate_queue; diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 5c52369..8cf39d4 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -23,21 +23,30 @@ #ifdef DEBUG /* For development, we want to crash whenever the ring is screwed. */ -#define BAD_RING(_vq, fmt...) \ - do { dev_err(&(_vq)->vq.vdev->dev, fmt); BUG(); } while(0) +#define BAD_RING(_vq, fmt, args...) \ + do { \ + dev_err(&(_vq)->vq.vdev->dev, \ + "%s:"fmt, (_vq)->vq.name, ##args); \ + BUG(); \ + } while (0) /* Caller is suppo...
2012 Oct 31
5
[RFC virtio-next 0/4] Introduce CAIF Virtio and reversed Vrings
This patch-set introduces the CAIF Virtio Link layer. The purpose is to communicate with a remote processor (a modem) over shared memory. Virtio is used as the transport mechanism, and the Remoteproc framework provides configuration and management of the Virtio rings and devices. The modem and Linux host may be on the same SoC, or connected over a shared memory interface such as LLI. Zero-Copy
2012 Oct 31
5
[RFC virtio-next 0/4] Introduce CAIF Virtio and reversed Vrings
This patch-set introduces the CAIF Virtio Link layer. The purpose is to communicate with a remote processor (a modem) over shared memory. Virtio is used as the transport mechanism, and the Remoteproc framework provides configuration and management of the Virtio rings and devices. The modem and Linux host may be on the same SoC, or connected over a shared memory interface such as LLI. Zero-Copy
2010 Jan 27
1
[PATCHv2] virtio: use smp_XX barriers on SMP
...t SMP barriers are defined to barrier() in that + * configuration. So fall back to mandatory barriers instead. */ +#define virtio_mb() mb() +#define virtio_rmb() rmb() +#define virtio_wmb() wmb() +#endif + #ifdef DEBUG /* For development, we want to crash whenever the ring is screwed. */ #define BAD_RING(_vq, fmt, args...) \ @@ -36,10 +54,10 @@ panic("%s:in_use = %i\n", \ (_vq)->vq.name, (_vq)->in_use); \ (_vq)->in_use = __LINE__; \ - mb(); \ + virtio_mb(); \ } while (0) #define END_USE(_vq) \ - do { BUG_ON(!(_vq)->in_use); (_vq)->in...
2010 Jan 27
1
[PATCHv2] virtio: use smp_XX barriers on SMP
...t SMP barriers are defined to barrier() in that + * configuration. So fall back to mandatory barriers instead. */ +#define virtio_mb() mb() +#define virtio_rmb() rmb() +#define virtio_wmb() wmb() +#endif + #ifdef DEBUG /* For development, we want to crash whenever the ring is screwed. */ #define BAD_RING(_vq, fmt, args...) \ @@ -36,10 +54,10 @@ panic("%s:in_use = %i\n", \ (_vq)->vq.name, (_vq)->in_use); \ (_vq)->in_use = __LINE__; \ - mb(); \ + virtio_mb(); \ } while (0) #define END_USE(_vq) \ - do { BUG_ON(!(_vq)->in_use); (_vq)->in...
2023 Apr 13
1
[PATCH net-next V2 0/2] virtio-net: don't busy poll for cvq command
...happen if the VDUSE application crashed for example. Regards, Maxime [0]: > Thanks > > Changes since V1: > - use RTNL to synchronize rx mode worker > - use completion for simplicity > - don't try to harden CVQ command > > Changes since RFC: > > - switch to use BAD_RING in virtio_break_device() > - check virtqueue_is_broken() after being woken up > - use more_used() instead of virtqueue_get_buf() to allow caller to > get buffers afterwards > - break the virtio-net device when timeout > - get buffer manually since the virtio core check mo...