From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 54D77A10 for ; Mon, 15 Jun 2015 12:21:42 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 15 Jun 2015 03:21:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,618,1427785200"; d="scan'208";a="743578153" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.22]) by fmsmga002.fm.intel.com with SMTP; 15 Jun 2015 03:21:39 -0700 Received: by (sSMTP sendmail emulation); Mon, 15 Jun 2015 11:21:39 +0025 Date: Mon, 15 Jun 2015 11:21:39 +0100 From: Bruce Richardson To: "Assaad, Sami (Sami)" Message-ID: <20150615102138.GB3872@bricha3-MOBL3> References: <9478F0FB69DAA249AF0A9BDA1E6ED9521883632F@US70TWXCHMBA07.zam.alcatel-lucent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9478F0FB69DAA249AF0A9BDA1E6ED9521883632F@US70TWXCHMBA07.zam.alcatel-lucent.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] DPDK and ASLR 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: Mon, 15 Jun 2015 10:21:42 -0000 On Fri, Jun 12, 2015 at 10:53:58PM +0000, Assaad, Sami (Sami) wrote: > When I operate a DPDK based application, the EAL always reports the following: > EAL: WARNING: Address Space Layout Randomization (ASLR) is enabled in the kernel. > EAL: This may cause issues with mapping memory into secondary processes. > > Our application is DPDK client/server based and runs properly. > > My questions are: > > * Is this warning of any importance? Yes, it's there for a reason. With ASLR, the position of the hugepage (and other) memory in your DPDK primary process virtual address space will move about from one run to another, and the same with the secondary process. Because of this, you may occasionally get instances where your application fails to run because an essential piece of memory is mapped at address X in the primary, while something else is mapped at address X in the secondary process. How frequently, if ever, this happens will vary from application to application. If ASLR is disabled, the memory mappings created in the primary and secondary processes will be identical and repeatable from one run to another, so you can know that if a set of processes starts once, it will start a second time. With ASLR enabled, that guarantee cannot be made. > > * Should ASLR be disabled? > That is a questions we can't answer for you. ASLR is a security feature in the OS so you should be aware of the implications of disabling it. However, if you need absolute guarantees of repeatabiltiy of mappings from one multi-process run to another, the only way get that - that I am aware of - is to disable ASLR. If an occasional random failure at startup is ok, then ASLR can safely be left on. > * Does ASLR affect DPDK performance? No, it only affects the repeatability of memory mappings at DPDK start-up. Hope this clarifies things. /Bruce >