]> git.karo-electronics.de Git - karo-tx-linux.git/commit
uml: deal with inaccessible address space start
authorTom Spink <tspink@gmail.com>
Tue, 5 Aug 2008 20:14:06 +0000 (16:14 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Aug 2008 18:15:37 +0000 (11:15 -0700)
commitd448dc1547ff53d06386582bb9db155aec2b10a7
treed3631a9b237930d41d97765a887fc42db34cfd3d
parentbbdf9b9a28729ed1dd211368f76baef051aaecae
uml: deal with inaccessible address space start

commit 40fb16a360d9c6459afee91dc793c1e3374feb94 upstream

This patch makes os_get_task_size locate the bottom of the address space,
as well as the top.  This is for systems which put a lower limit on mmap
addresses.  It works by manually scanning pages from zero onwards until a
valid page is found.

Because the bottom of the address space may not be zero, it's not
sufficient to assume the top of the address space is the size of the
address space.  The size is the difference between the top address and
bottom address.

[jdike@addtoit.com: changed the name to reflect that this function is
supposed to return the top of the process address space, not its size and
changed the return value to reflect that.  Also some minor formatting
changes]

Signed-off-by: Tom Spink <tspink@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/um/include/os.h
arch/um/kernel/um_arch.c
arch/um/os-Linux/sys-i386/task_size.c
arch/um/os-Linux/sys-x86_64/task_size.c