mirror of https://github.com/torvalds/linux.git
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/ |
||
|---|---|---|
| .. | ||
| cpufreq | ||
| .gitignore | ||
| 8250-platform.c | ||
| Makefile | ||
| asm-offsets.c | ||
| binfmt_elfn32.c | ||
| binfmt_elfo32.c | ||
| branch.c | ||
| cevt-bcm1480.c | ||
| cevt-ds1287.c | ||
| cevt-gt641xx.c | ||
| cevt-r4k.c | ||
| cevt-sb1250.c | ||
| cevt-smtc.c | ||
| cevt-txx9.c | ||
| cpu-bugs64.c | ||
| cpu-probe.c | ||
| csrc-bcm1480.c | ||
| csrc-ioasic.c | ||
| csrc-powertv.c | ||
| csrc-r4k.c | ||
| csrc-sb1250.c | ||
| early_printk.c | ||
| entry.S | ||
| ftrace.c | ||
| genex.S | ||
| gpio_txx9.c | ||
| head.S | ||
| i8253.c | ||
| i8259.c | ||
| init_task.c | ||
| irq-gic.c | ||
| irq-gt641xx.c | ||
| irq-msc01.c | ||
| irq-rm7000.c | ||
| irq-rm9000.c | ||
| irq.c | ||
| irq_cpu.c | ||
| irq_txx9.c | ||
| kgdb.c | ||
| kprobes.c | ||
| kspd.c | ||
| linux32.c | ||
| machine_kexec.c | ||
| mcount.S | ||
| mips-mt-fpaff.c | ||
| mips-mt.c | ||
| mips_ksyms.c | ||
| module.c | ||
| octeon_switch.S | ||
| perf_event.c | ||
| perf_event_mipsxx.c | ||
| proc.c | ||
| process.c | ||
| prom.c | ||
| ptrace.c | ||
| ptrace32.c | ||
| r4k_fpu.S | ||
| r4k_switch.S | ||
| r2300_fpu.S | ||
| r2300_switch.S | ||
| r6000_fpu.S | ||
| relocate_kernel.S | ||
| reset.c | ||
| rtlx.c | ||
| scall32-o32.S | ||
| scall64-64.S | ||
| scall64-n32.S | ||
| scall64-o32.S | ||
| setup.c | ||
| signal-common.h | ||
| signal.c | ||
| signal32.c | ||
| signal_n32.c | ||
| smp-cmp.c | ||
| smp-mt.c | ||
| smp-up.c | ||
| smp.c | ||
| smtc-asm.S | ||
| smtc-proc.c | ||
| smtc.c | ||
| spinlock_test.c | ||
| spram.c | ||
| stacktrace.c | ||
| sync-r4k.c | ||
| syscall.c | ||
| time.c | ||
| topology.c | ||
| traps.c | ||
| unaligned.c | ||
| vdso.c | ||
| vmlinux.lds.S | ||
| vpe.c | ||
| watch.c | ||