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

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