On 5/23/19 5:17 PM, Mattias Rönnblom wrote:
On 2019-05-23 16:30, Maxime Coquelin wrote:
Hi Mattias,

On 5/21/19 9:43 PM, Mattias Rönnblom wrote:
On 2019-05-17 14:22, Maxime Coquelin wrote:
Handling of fragmented virtio-net header and indirect descriptors
tables was implemented to fix CVE-2018-1059. It should not never
happen with healthy guests and so are already considered as
unlikely code path.

This patch moves these bits into non-inline dedicated functions
to reduce the I-cache pressure.

Signed-off-by: Maxime Coquelin <maxime.coque...@redhat.com>
---
  lib/librte_vhost/vhost.c      |  33 +++++++++++
  lib/librte_vhost/vhost.h      |  35 +-----------
  lib/librte_vhost/virtio_net.c | 102 +++++++++++++++++++---------------
  3 files changed, 91 insertions(+), 79 deletions(-)

diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c
index 4a54ad6bd1..8a4379bc13 100644
--- a/lib/librte_vhost/vhost.c
+++ b/lib/librte_vhost/vhost.c
@@ -201,6 +201,39 @@ __vhost_log_cache_write(struct virtio_net *dev, struct vhost_virtqueue *vq,
  }
+void *
+alloc_copy_ind_table(struct virtio_net *dev, struct vhost_virtqueue *vq,

This function should have a prefix.

This function is just moved from vhost.h to vhost.c, so not the purpose
of the patch.


It was declared "static inline" in the header file, and thus only affected those who included the file, as opposed to polluting the whole DPDK library name space.

Right, I'll fix the name in next revision.

Thanks,
Maxime

Reply via email to