From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatoly Burakov Subject: [PATCH] ivshmem: document a potential segmentation fault in rte_ring Date: Wed, 1 Jun 2016 15:51:57 +0100 Message-ID: <1464792717-17171-1-git-send-email-anatoly.burakov@intel.com> Cc: ferruh.yigit@intel.com To: dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 68CE6568B for ; Wed, 1 Jun 2016 16:52:01 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Commit 4768c475 added a pointer to the memzone in rte_ring. However, all memzones are residing in local mem_config, therefore accessing the memzone pointer inside the guest in an IVSHMEM-shared rte_ring will cause segmentation fault. This issue is unlikely to ever get fixed, as this would require lots of changes for very little benefit, therefore we're documenting this limitation instead. Signed-off-by: Anatoly Burakov --- doc/guides/prog_guide/ivshmem_lib.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/guides/prog_guide/ivshmem_lib.rst b/doc/guides/prog_guide/ivshmem_lib.rst index 9401ccf..b8a32e4 100644 --- a/doc/guides/prog_guide/ivshmem_lib.rst +++ b/doc/guides/prog_guide/ivshmem_lib.rst @@ -79,6 +79,8 @@ The following is a simple guide to using the IVSHMEM Library API: Only data structures fully residing in DPDK hugepage memory work correctly. Supported data structures created by malloc(), mmap() or otherwise using non-DPDK memory cause undefined behavior and even a segmentation fault. + Specifically, because the memzone field in an rte_ring refers to a memzone structure residing in local memory, + accessing the memzone field in a shared rte_ring will cause an immediate segmentation fault. IVSHMEM Environment Configuration --------------------------------- -- 2.5.0