]> git.baikalelectronics.ru Git - kernel.git/commit
x86/selftests: Add test for mapping placement for 5-level paging
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Wed, 15 Nov 2017 14:36:07 +0000 (17:36 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 16 Nov 2017 10:43:12 +0000 (11:43 +0100)
commita0df78487a76825756efc8e6e155bd773b7d3d44
treead5902efa2b4a894b256b8e3d662d937c9f23f2e
parent05185a4046470c5e3be5b9736a7f608ede321d25
x86/selftests: Add test for mapping placement for 5-level paging

5-level paging provides a 56-bit virtual address space for user space
application. But the kernel defaults to mappings below the 47-bit address
space boundary, which is the upper bound for 4-level paging, unless an
application explicitely request it by using a mmap(2) address hint above
the 47-bit boundary. The kernel prevents mappings which spawn across the
47-bit boundary unless mmap(2) was invoked with MAP_FIXED.

Add a self-test that covers the corner cases of the interface and validates
the correctness of the implementation.

[ tglx: Massaged changelog once more ]

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: linux-mm@kvack.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lkml.kernel.org/r/20171115143607.81541-2-kirill.shutemov@linux.intel.com
tools/testing/selftests/x86/5lvl.c [new file with mode: 0644]
tools/testing/selftests/x86/Makefile