linux/arch/mips/kernel
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
..
cpufreq MIPS: Use set_cpus_allowed_ptr 2010-05-21 21:31:14 +01:00
.gitignore
8250-platform.c
Makefile MIPS: add support for hardware performance events (skeleton) 2010-10-29 19:08:48 +01:00
asm-offsets.c MIPS: Remove unused task_struct.trap_no field. 2010-08-05 13:26:30 +01:00
binfmt_elfn32.c
binfmt_elfo32.c
branch.c MIPS: Sanitize restart logics 2010-10-18 16:59:02 +01:00
cevt-bcm1480.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
cevt-ds1287.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
cevt-gt641xx.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
cevt-r4k.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
cevt-sb1250.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
cevt-smtc.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
cevt-txx9.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
cpu-bugs64.c MIPS: uasm: Add option to export uasm API. 2010-08-05 13:26:21 +01:00
cpu-probe.c MIPS: Make TASK_SIZE reflect proper size for both 32 and 64 bit processes. 2010-10-29 19:08:53 +01:00
csrc-bcm1480.c
csrc-ioasic.c
csrc-powertv.c
csrc-r4k.c
csrc-sb1250.c
early_printk.c
entry.S
ftrace.c MIPS: Tracing: Cleanup of address space checking 2010-07-05 17:17:30 +01:00
genex.S
gpio_txx9.c
head.S
i8253.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
i8259.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
init_task.c
irq-gic.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
irq-gt641xx.c
irq-msc01.c
irq-rm7000.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
irq-rm9000.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
irq.c MIPS: IRQ: Add stackoverflow detection 2010-10-29 19:08:27 +01:00
irq_cpu.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
irq_txx9.c MIPS: Add missing #inclusions of <linux/irq.h> 2010-10-07 14:08:54 +01:00
kgdb.c MIPS: Fix a typo. 2010-10-04 18:33:54 +01:00
kprobes.c MIPS: kprobe: Add support. 2010-08-05 13:26:29 +01:00
kspd.c MIPS: kspd: Adjust confusing if indentation 2010-10-04 18:33:54 +01:00
linux32.c MIPS: Hookup fanotify_init, fanotify_mark, and prlimit64 syscalls. 2010-10-04 18:33:59 +01:00
machine_kexec.c
mcount.S MIPS: tracing: Fix the indentation of mcount.S 2010-08-05 13:26:06 +01:00
mips-mt-fpaff.c MIPS: MT: Fix build error iFPU affinity code 2010-10-25 08:12:27 -07:00
mips-mt.c
mips_ksyms.c
module.c
octeon_switch.S
perf_event.c MIPS: Add support for hardware performance events (mipsxx) 2010-10-29 19:08:49 +01:00
perf_event_mipsxx.c MIPS: Add support for hardware performance events (mipsxx) 2010-10-29 19:08:49 +01:00
proc.c
process.c
prom.c of/mips: Add device tree support to MIPS 2010-10-21 11:10:10 -06:00
ptrace.c ptrace: cleanup arch_ptrace() on MIPS 2010-10-27 18:03:11 -07:00
ptrace32.c
r4k_fpu.S
r4k_switch.S
r2300_fpu.S
r2300_switch.S
r6000_fpu.S
relocate_kernel.S
reset.c
rtlx.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
scall32-o32.S Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus 2010-10-18 13:10:36 -07:00
scall64-64.S Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus 2010-10-18 13:10:36 -07:00
scall64-n32.S Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus 2010-10-20 13:18:21 -07:00
scall64-o32.S Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus 2010-10-20 13:18:21 -07:00
setup.c MIPS: Add a platform hook for swiotlb setup. 2010-10-29 19:08:32 +01:00
signal-common.h
signal.c MIPS: do_sigaltstack() expects userland pointers 2010-10-18 16:59:03 +01:00
signal32.c
signal_n32.c MIPS: do_sigaltstack() expects userland pointers 2010-10-18 16:59:03 +01:00
smp-cmp.c
smp-mt.c
smp-up.c
smp.c MIPS: Export __cpu_number_map and __cpu_logical_map. 2010-08-05 13:26:21 +01:00
smtc-asm.S
smtc-proc.c
smtc.c Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
spinlock_test.c
spram.c
stacktrace.c
sync-r4k.c
syscall.c Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
time.c
topology.c
traps.c MIPS: Allow UserLocal on MIPS_R1 processors 2010-10-29 19:08:53 +01:00
unaligned.c MIPS: add support for software performance events 2010-10-29 19:08:48 +01:00
vdso.c MIPS: Make init_vdso a subsys_initcall. 2010-07-26 19:08:16 +01:00
vmlinux.lds.S
vpe.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
watch.c