]> git.baikalelectronics.ru Git - kernel.git/commit
nommu: fix malloc performance by adding uninitialized flag
authorJie Zhang <jie.zhang@analog.com>
Tue, 15 Dec 2009 02:00:02 +0000 (18:00 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2009 16:53:24 +0000 (08:53 -0800)
commita28a09709d29078d46ef6a84436e70290371dd8d
tree7ea3e4baf2ffade539ae30192521d331f8e863fa
parentb52941746a1747d5111391a0c3a05aca1d842347
nommu: fix malloc performance by adding uninitialized flag

The NOMMU code currently clears all anonymous mmapped memory.  While this
is what we want in the default case, all memory allocation from userspace
under NOMMU has to go through this interface, including malloc() which is
allowed to return uninitialized memory.  This can easily be a significant
performance penalty.  So for constrained embedded systems were security is
irrelevant, allow people to avoid clearing memory unnecessarily.

This also alters the ELF-FDPIC binfmt such that it obtains uninitialised
memory for the brk and stack region.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/nommu-mmap.txt
fs/binfmt_elf_fdpic.c
include/asm-generic/mman-common.h
init/Kconfig
mm/nommu.c