Displaying 5 results from an estimated 5 matches for "vring_needs_used_validation".
2023 May 26
1
[PATCH] virtio_ring: validate used buffer length
...plit.desc_state[i].data;
@@ -1085,10 +1105,25 @@ static void vring_free_split(struct vring_virtqueue_split *vring_split,
vring_split->queue_dma_addr,
dma_dev);
+ kfree(vring_split->buflen);
kfree(vring_split->desc_state);
kfree(vring_split->desc_extra);
}
+static bool vring_needs_used_validation(const struct virtio_device *vdev)
+{
+ /*
+ * Several legacy devices are known to produce buggy used
+ * length. In order to let driver work, we won't validate used
+ * buffer length in this case.
+ */
+ if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1))
+ return false;
+ if (force_used_va...
2023 May 31
1
[PATCH] virtio_ring: validate used buffer length
...egacy devices are known
> > > > to report buggy used length". If they report buggy length then how
> > > > can things work?
> > >
> > > The validation is disabled for legacy device (as stated in the changelog):
> > >
> > > static bool vring_needs_used_validation(const struct virtio_device *vdev)
> > > {
> > > /*
> > > * Several legacy devices are known to produce buggy used
> > > * length. In order to let driver work, we won't validate used
> > > * buffer length in this cas...
2023 May 31
1
[PATCH] virtio_ring: validate used buffer length
...gt; > > > to report buggy used length". If they report buggy length then how
> > > > > can things work?
> > > >
> > > > The validation is disabled for legacy device (as stated in the changelog):
> > > >
> > > > static bool vring_needs_used_validation(const struct virtio_device *vdev)
> > > > {
> > > > /*
> > > > * Several legacy devices are known to produce buggy used
> > > > * length. In order to let driver work, we won't validate used
> > > > *...
2023 Jun 01
1
[PATCH] virtio_ring: validate used buffer length
...gt; > > > to report buggy used length". If they report buggy length then how
> > > > > can things work?
> > > >
> > > > The validation is disabled for legacy device (as stated in the changelog):
> > > >
> > > > static bool vring_needs_used_validation(const struct virtio_device *vdev)
> > > > {
> > > > /*
> > > > * Several legacy devices are known to produce buggy used
> > > > * length. In order to let driver work, we won't validate used
> > > > *...
2023 Jun 01
1
[PATCH] virtio_ring: validate used buffer length
...ort buggy used length". If they report buggy length then how
> > > > > > can things work?
> > > > >
> > > > > The validation is disabled for legacy device (as stated in the changelog):
> > > > >
> > > > > static bool vring_needs_used_validation(const struct virtio_device *vdev)
> > > > > {
> > > > > /*
> > > > > * Several legacy devices are known to produce buggy used
> > > > > * length. In order to let driver work, we won't validate used
> > &...