selftests/x86: Add vDSO mremap() test
authorDmitry Safonov <dsafonov@virtuozzo.com>
Tue, 28 Jun 2016 11:35:39 +0000 (14:35 +0300)
committerIngo Molnar <mingo@kernel.org>
Fri, 8 Jul 2016 12:17:51 +0000 (14:17 +0200)
commitf80fd3a5fff88a9ace7e8cd11d07cf874a63ea9f
treea9b9b9d367ec857c3bcf251ce5491c2bb2eb66c2
parentb059a453b1cf1c8453c2b2ed373d3147d6264ebd
selftests/x86: Add vDSO mremap() test

Should print this on vDSO remapping success (on new kernels):

 [root@localhost ~]# ./test_mremap_vdso_32
AT_SYSINFO_EHDR is 0xf773f000
 [NOTE] Moving vDSO: [f773f000f7740000] -> [a000000a001000]
 [OK]

Or print that mremap() for vDSOs is unsupported:

 [root@localhost ~]# ./test_mremap_vdso_32
AT_SYSINFO_EHDR is 0xf773c000
 [NOTE] Moving vDSO: [0xf773c000, 0xf773d000] -> [0xf7737000, 0xf7738000]
 [FAIL] mremap() of the vDSO does not work on this kernel!

Suggested-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Andy Lutomirski <luto@kernel.org>
Cc: 0x7f454c46@gmail.com
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kselftest@vger.kernel.org
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20160628113539.13606-3-dsafonov@virtuozzo.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/testing/selftests/x86/Makefile
tools/testing/selftests/x86/test_mremap_vdso.c [new file with mode: 0644]