[android-kernel] Question about MMAP Size

89 views
Skip to first unread message

white

unread,
Apr 28, 2010, 3:54:59 AM4/28/10
to Android Linux Kernel Development, mal...@google.com
I want to know more datail about this.

As I know, android platform is using binder mechanism, and binder is
using mmap mechanism.
Iliyan Malchev fixed mmap size, 4KB -> 32KB.

Does it affect to platform's performance and security?

Just I read the comment, that's no related to performance and
security.
And linux kernel recommend 4KB minimal mmap size.

If there are no issue, I think it's not necessary to change.


[ARM] msm: msm_defconfig: increase mmap_min_addr to 32k 06/14006/2
author Iliyan Malchev <mal...@google.com>
Wed, 17 Mar 2010 20:58:55 +0000 (13:58 -0700)
committer Iliyan Malchev <mal...@google.com>
Thu, 18 Mar 2010 04:21:29 +0000 (21:21 -0700)
commit f797f5b9a88eb92e7834f0862857d047fc1031cd
tree f07c25347d422a2822d5ef042f2fbb1aa15c52dc tree | snapshot
parent 4a8b102321f02bd4959f4a233535b3c6effa85c4 commit | diff
[ARM] msm: msm_defconfig: increase mmap_min_addr to 32k

A lot of kernel structures are larger than 4k, and so NULL-pointer
dereferences
could still be exploitable.

index 46bc204..7a9fe0d 100755 (executable)
--- a/arch/arm/configs/msm_defconfig
+++ b/arch/arm/configs/msm_defconfig
@@ -292,7 +292,7 @@ CONFIG_ZONE_DMA_FLAG=0
CONFIG_VIRT_TO_BUS=y
CONFIG_UNEVICTABLE_LRU=y
CONFIG_ALIGNMENT_TRAP=y
-CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_DEFAULT_MMAP_MIN_ADDR=32768

#
# Boot options

--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel

San Mehat

unread,
Apr 28, 2010, 9:34:20 AM4/28/10
to android...@googlegroups.com, mal...@google.com
On Wed, Apr 28, 2010 at 12:54 AM, white <kyungt...@gmail.com> wrote:
> I want to know more datail about this.
>
> As I know, android platform is using binder mechanism, and binder is
> using mmap mechanism.
> Iliyan Malchev fixed mmap size, 4KB -> 32KB.
>
> Does it affect to platform's performance and security?
>
> Just I read the comment, that's no related to performance and
> security.
> And linux kernel recommend 4KB minimal mmap size.
>
> If there are no issue, I think it's not necessary to change.
>

Well it certainly helps.
--
San Mehat  |  Staff Software Engineer  |  Android  |  Google Inc.
415.366.6172 (s...@google.com)

Greg KH

unread,
Apr 28, 2010, 11:57:06 AM4/28/10
to android...@googlegroups.com, mal...@google.com
On Wed, Apr 28, 2010 at 12:54 AM, white <kyungt...@gmail.com> wrote:
> I want to know more datail about this.
>
> As I know, android platform is using binder mechanism, and binder is
> using mmap mechanism.
> Iliyan Malchev fixed mmap size, 4KB -> 32KB.

No, that was not a "size" change.

And binder has _nothing_ to do with this change.

> Does it affect to platform's performance and security?

Performance no.

Security yes.

> Just I read the comment, that's no related to performance and
> security.
> And linux kernel recommend 4KB minimal mmap size.

The "size" has nothing to do with this change. Go read the
patch again to see that.

> If there are no issue, I think it's not necessary to change.

Then feel free to revert it in your kernel and watch people get root
on your systems very easily :)

good luck,

greg k-h
Reply all
Reply to author
Forward
0 new messages