vhost: handle virtually non-contiguous buffers in Rx
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 1 Mar 2018 07:47:58 +0000 (08:47 +0100)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Mon, 23 Apr 2018 15:12:13 +0000 (17:12 +0200)
commit6727f5a739b6f26689e5189a74d37afdb926c0ac
treeb4d8032a95fd01cb490c5db4bdea61ed3c94a588
parent91b7b40806b6ea9910d6686fddcf7c970771fa72
vhost: handle virtually non-contiguous buffers in Rx

This patch enables the handling of buffers non-contiguous in
process virtual address space in the enqueue path when mergeable
buffers aren't used.

When virtio-net header doesn't fit in a single chunck, it is
computed in a local variable and copied to the buffer chuncks
afterwards.

For packet content, the copy length is limited to the chunck
size, next chuncks VAs being fetched afterward.

This issue has been assigned CVE-2018-1059.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/virtio_net.c