OSDN Git Service

Disable ADDR_NO_RANDOMIZE for 3.4 or greater kernels
authorNick Kralevich <nnk@google.com>
Wed, 26 Sep 2012 23:53:31 +0000 (16:53 -0700)
committerNick Kralevich <nnk@google.com>
Wed, 26 Sep 2012 23:53:31 +0000 (16:53 -0700)
commit138b7a2e54923d99ed817f9a890c6fcd7c23c335
tree9e8f643c09db5d1928b1585ee6a82728ce1effeb
parentb52088150122a86c72868c38f05846b214ebd5d1
Disable ADDR_NO_RANDOMIZE for 3.4 or greater kernels

Early kernels had memory fragmentation bugs on ARM when
ASLR was enabled. The ADDR_NO_RANDOMIZE flag was added
to work around this bug until the appropriate kernel fix
could be made.

Linux kernel 3.4 seems to have this fix, making this workaround
unnecessary.  Remove the workaround if we detect we're running
an up-to-date kernel.

(I believe the kernel patch is also in 3.3, but haven't explicitly
tested it).

Bug: 5817320
Change-Id: Ifcbc68fdfb2ada0f55358e7a7af9e155fe3bec4f
vm/native/dalvik_system_Zygote.cpp