[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121022143940.6bf8103f.akpm@linux-foundation.org>
Date: Mon, 22 Oct 2012 14:39:40 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Andi Kleen <andi@...stfloor.org>
Cc: Michael Kerrisk <mtk.manpages@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
Hillf Danton <dhillf@...il.com>
Subject: Re: [PATCH] MM: Support more pagesizes for MAP_HUGETLB/SHM_HUGETLB
v6
On Mon, 22 Oct 2012 15:27:33 +0200
Andi Kleen <andi@...stfloor.org> wrote:
> BTW seriously MAP_UNINITIALIZED? Who came up with that?
> MAP_COMPLETELY_INSECURE or MAP_INSANE would have been more appropiate.
heh. It's a NOMMU-only thing.
config MMAP_ALLOW_UNINITIALIZED
bool "Allow mmapped anonymous memory to be uninitialized"
depends on EXPERT && !MMU
default n
help
Normally, and according to the Linux spec, anonymous memory obtained
from mmap() has it's contents cleared before it is passed to
userspace. Enabling this config option allows you to request that
mmap() skip that if it is given an MAP_UNINITIALIZED flag, thus
providing a huge performance boost. If this option is not enabled,
then the flag will be ignored.
This is taken advantage of by uClibc's malloc(), and also by
ELF-FDPIC binfmt's brk and stack allocator.
Because of the obvious security issues, this option should only be
enabled on embedded devices where you control what is run in
userspace. Since that isn't generally a problem on no-MMU systems,
it is normally safe to say Y here.
See Documentation/nommu-mmap.txt for more information.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists