DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: "Assaad, Sami (Sami)" <sami.assaad@alcatel-lucent.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] DPDK and ASLR
Date: Mon, 15 Jun 2015 11:21:39 +0100	[thread overview]
Message-ID: <20150615102138.GB3872@bricha3-MOBL3> (raw)
In-Reply-To: <9478F0FB69DAA249AF0A9BDA1E6ED9521883632F@US70TWXCHMBA07.zam.alcatel-lucent.com>

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
> 

      reply	other threads:[~2015-06-15 10:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 22:53 Assaad, Sami (Sami)
2015-06-15 10:21 ` Bruce Richardson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150615102138.GB3872@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=sami.assaad@alcatel-lucent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).