From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP; 04 Oct 2016 12:07:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,444,1473145200"; d="scan'208";a="16628115" Received: from mpaolini-mobl1.ger.corp.intel.com (HELO [10.252.6.82]) ([10.252.6.82]) by orsmga004.jf.intel.com with ESMTP; 04 Oct 2016 12:07:05 -0700 To: jean.tourrilhes@hpe.com, Thomas Monjalon References: <20160921211049.GA27472@labs.hpe.com> <6928094.Vgjcapsp68@xps13> <417ffa55-a8bf-a769-d751-b023d72993d8@intel.com> <2392264.CCbfKQ6uGK@xps13> <20161004171703.GA3053@labs.hpe.com> Cc: dev@dpdk.org From: Sergio Gonzalez Monroy Message-ID: Date: Tue, 4 Oct 2016 20:07:04 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <20161004171703.GA3053@labs.hpe.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/3] mem: fix hugepage mapping error messages X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 19:07:08 -0000 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