]> asedeno.scripts.mit.edu Git - linux.git/commit
x86/mm: Add task_size parameter to mmap_base()
authorDmitry Safonov <dsafonov@virtuozzo.com>
Mon, 6 Mar 2017 14:17:18 +0000 (17:17 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 13 Mar 2017 13:59:22 +0000 (14:59 +0100)
commit8f3e474f3cea7b2470218a6ed6da47ff02147dce
treeffb74bdfb6bf952a893afb5425903a906eeec8ff
parent6a0b41d1e23dd3318568461593ae5e36d966981e
x86/mm: Add task_size parameter to mmap_base()

To correctly handle 32-bit and 64-bit mmap() syscalls in 64bit applications
its required to have separate address bases to place a mapping.

The tasksize can be used as an indicator to select the proper parameters
for mmap_base().

This requires the following changes:

 - Add task_size argument to mmap_base() and make the calculation based on it.
 - Provide mmap_legacy_base() as a seperate function
 - Use the new functions in arch_pick_mmap_layout()

[ tglx: Massaged changelog ]

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: 0x7f454c46@gmail.com
Cc: linux-mm@kvack.org
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Link: http://lkml.kernel.org/r/20170306141721.9188-3-dsafonov@virtuozzo.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/elf.h
arch/x86/include/asm/processor.h
arch/x86/mm/mmap.c