selftests/x86: Fix vDSO selftest segfault for vsyscall=none
authorDominik Brodowski <[email protected]>
Sun, 11 Feb 2018 11:10:10 +0000 (12:10 +0100)
committerIngo Molnar <[email protected]>
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 <[email protected]>
Cc: Andrew Lutomirski <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
tools/testing/selftests/x86/test_vdso.c