From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergio Gonzalez Monroy Subject: Re: [PATCH v2 1/3] mem: fix hugepage mapping error messages Date: Tue, 4 Oct 2016 20:07:04 +0100 Message-ID: References: <20160921211049.GA27472@labs.hpe.com> <6928094.Vgjcapsp68@xps13> <417ffa55-a8bf-a769-d751-b023d72993d8@intel.com> <2392264.CCbfKQ6uGK@xps13> <20161004171703.GA3053@labs.hpe.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: jean.tourrilhes@hpe.com, Thomas Monjalon Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 37C34532E for ; Tue, 4 Oct 2016 21:07:08 +0200 (CEST) In-Reply-To: <20161004171703.GA3053@labs.hpe.com> 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" On 04/10/2016 18:17, Jean Tourrilhes wrote: > Running secondary is tricky due to the need to map the memory region > at the right place in VM, which is whatever primary has chosen. If the > base address for primary happens to by already mapped in the > secondary, we will hit precisely these error messages (depending if we > fail on the config region or the hugepages). This is why there is > already a comment about ASLR. > > The issue is that in most cases, remapping does not happen and "errno" > is not changed and therefore stale. In our case, we got a "permission > denied", which sent us down the wrong track. It's such a common error > for secondary that I feel this error message should be unambiguous and > helpful. > The call to close was also moved because close() may override errno. > > Signed-off-by: Jean Tourrilhes > --- > lib/librte_eal/linuxapp/eal/eal.c | 14 +++++++++++--- > lib/librte_eal/linuxapp/eal/eal_memory.c | 16 ++++++++++++---- > 2 files changed, 23 insertions(+), 7 deletions(-) Acked-by: Sergio Gonzalez Monroy