]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] uclinux: correctly remap bin_fmtflat exe allocated mem regions
authorGreg Ungerer <gerg@snapgear.com>
Wed, 7 Feb 2007 02:03:08 +0000 (12:03 +1000)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 9 Feb 2007 18:45:33 +0000 (10:45 -0800)
commit5627350806576b615071a6518a198f3c3cb2a56e
tree14cb1a018093cd1b5a0924850d36106cc0cd40d9
parent9b451974fd29d7e5ac0f4c01eeac5ccf61a9435c
[PATCH] uclinux: correctly remap bin_fmtflat exe allocated mem regions

remap() the region we get from mmap() to mark the fact that we are
using all of the available slack space. Any slack space is used
to form a simple brk region, and potentially more stack space than
requested at load time.

Any searches of the vma chain may well fail looking for
stack (and especially arg) addresses if the remaping is not done.
The simplest example is /proc/<pid>/cmdline, since the args
are pretty much always at the top of the data/bss/stack region.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_flat.c