selftests/x86: Fix vDSO selftest segfault for vsyscall=none
authorDominik Brodowski <linux@dominikbrodowski.net>
Sun, 11 Feb 2018 11:10:10 +0000 (12:10 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 13 Feb 2018 08:04:55 +0000 (09:04 +0100)
commit198ee8e17502da2634f7366395db1d77630e0219
tree3fb8542c88da183c08bbe2fb54964b31bcd97c22
parentb498c261107461d5c42140dfddd05df83d8ca078
selftests/x86: Fix vDSO selftest segfault for vsyscall=none

The vDSO selftest tries to execute a vsyscall unconditionally, even if it
is not present on the test system (e.g. if booted with vsyscall=none or
with CONFIG_LEGACY_VSYSCALL_NONE=y set. Fix this by copying (and tweaking)
the vsyscall check from test_vsyscall.c

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Andrew Lutomirski <luto@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kselftest@vger.kernel.org
Cc: shuah@kernel.org
Link: http://lkml.kernel.org/r/20180211111013.16888-3-linux@dominikbrodowski.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/testing/selftests/x86/test_vdso.c