David Daney 949e51bea3 MIPS: Make TASK_SIZE reflect proper size for both 32 and 64 bit processes.
The TASK_SIZE macro should reflect the size of a user process virtual
address space.  Previously for 64-bit kernels, this was not the case.
The immediate cause of pain was in
hugetlbfs/inode.c:hugetlb_get_unmapped_area() where 32-bit processes
trying to mmap a huge page would be served a page with an address
outside of the 32-bit address range.  But there are other uses of
TASK_SIZE in the kernel as well that would like an accurate value.

The new definition is nice because it now makes TASK_SIZE and
TASK_SIZE_OF() yield the same value for any given process.

For 32-bit kernels there should be no change, although I did factor
out some code in asm/processor.h that became identical for the 32-bit and
64-bit cases.

__UA_LIMIT is now set to ~((1 << SEGBITS) - 1) for 64-bit kernels.
This should eliminate the possibility of getting a
AddressErrorException in the kernel for addresses that pass the
access_ok() test.

With the patch applied, I can still run o32, n32 and n64 processes,
and have an o32 shell fork/exec both n32 and n64 processes.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1701/
2010-10-29 19:08:53 +01:00
..
2010-05-21 21:31:14 +01:00
2008-05-01 08:03:58 -07:00
2010-10-18 16:59:02 +01:00
2010-10-29 19:08:27 +01:00
2010-10-04 18:33:54 +01:00
2010-08-05 13:26:29 +01:00
2009-08-03 17:52:40 +01:00
2009-07-12 12:22:34 -07:00
2010-10-27 18:03:11 -07:00
2006-12-10 21:52:11 +00:00
2010-10-15 15:53:27 +02:00
2010-10-07 14:08:55 +01:00
2009-06-24 18:34:40 +01:00
2010-07-26 19:08:16 +01:00
2010-10-15 15:53:27 +02:00