Commit fe157557 authored by Andy Lutomirski's avatar Andy Lutomirski Committed by Kleber Sacilotto de Souza

selftests/x86/ptrace_syscall_32: Fix no-vDSO segfault

BugLink: https://bugs.launchpad.net/bugs/1875905

[ Upstream commit 630b99ab ]

If AT_SYSINFO is not present, don't try to call a NULL pointer.
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/faaf688265a7e1a5b944d6f8bc0f6368158306d3.1584052409.git.luto@kernel.orgSigned-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 8a6ff7fe
......@@ -284,8 +284,12 @@ int main()
#if defined(__i386__) && (!defined(__GLIBC__) || __GLIBC__ > 2 || __GLIBC_MINOR__ >= 16)
vsyscall32 = (void *)getauxval(AT_SYSINFO);
printf("[RUN]\tCheck AT_SYSINFO return regs\n");
test_sys32_regs(do_full_vsyscall32);
if (vsyscall32) {
printf("[RUN]\tCheck AT_SYSINFO return regs\n");
test_sys32_regs(do_full_vsyscall32);
} else {
printf("[SKIP]\tAT_SYSINFO is not available\n");
}
#endif
test_ptrace_syscall_restart();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment