Blame SOURCES/0011-vhost-deprecate-unsafe-GPA-translation-API.patch

c7ffa4
From e4866aa27a33c6354c7086e608c0625a8c1a1ecc Mon Sep 17 00:00:00 2001
c7ffa4
From: Maxime Coquelin <maxime.coquelin@redhat.com>
c7ffa4
Date: Mon, 23 Apr 2018 11:33:48 +0200
c7ffa4
Subject: [PATCH 11/11] vhost: deprecate unsafe GPA translation API
c7ffa4
c7ffa4
This patch marks rte_vhost_gpa_to_vva() as deprecated because
c7ffa4
it is unsafe. Application relying on this API should move
c7ffa4
to the new rte_vhost_va_from_guest_pa() API, and check
c7ffa4
returned length to avoid out-of-bound accesses.
c7ffa4
c7ffa4
This issue has been assigned CVE-2018-1059.
c7ffa4
c7ffa4
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
c7ffa4
---
c7ffa4
 lib/librte_vhost/rte_vhost.h | 6 ++++++
c7ffa4
 1 file changed, 6 insertions(+)
c7ffa4
c7ffa4
diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h
c7ffa4
index f2d6c95..3fc6034 100644
c7ffa4
--- a/lib/librte_vhost/rte_vhost.h
c7ffa4
+++ b/lib/librte_vhost/rte_vhost.h
c7ffa4
@@ -118,4 +118,9 @@ struct vhost_device_ops {
c7ffa4
  * Convert guest physical address to host virtual address
c7ffa4
  *
c7ffa4
+ * This function is deprecated because unsafe.
c7ffa4
+ * New rte_vhost_va_from_guest_pa() should be used instead to ensure
c7ffa4
+ * guest physical ranges are fully and contiguously mapped into
c7ffa4
+ * process virtual address space.
c7ffa4
+ *
c7ffa4
  * @param mem
c7ffa4
  *  the guest memory regions
c7ffa4
@@ -125,4 +130,5 @@ struct vhost_device_ops {
c7ffa4
  *  the host virtual address on success, 0 on failure
c7ffa4
  */
c7ffa4
+__rte_deprecated
c7ffa4
 static __rte_always_inline uint64_t
c7ffa4
 rte_vhost_gpa_to_vva(struct rte_vhost_memory *mem, uint64_t gpa)
c7ffa4
-- 
c7ffa4
1.8.3.1
c7ffa4