x86/compat: don't set has_compat_sigreturn if !CONFIG_COMPAT

We can be on v4.9 or newer kernel, but have no 32-bit multilib
toolchain, which will result in !CONFIG_COMPAT but
kdat_compat_sigreturn_test() will return true as we have
new arch_prctls in kernel needed for compatible C/R.
Fail compat test in this case.

travis-ci: success for 32-bit tests fixes
Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Dmitry Safonov 2017-01-09 20:19:07 +03:00 committed by Andrei Vagin
parent dd6736bd24
commit 08cbdefb02

View file

@ -30,6 +30,7 @@
#ifdef CONFIG_X86_64
int kdat_compat_sigreturn_test(void)
{
#ifdef CONFIG_COMPAT
unsigned long auxval;
int ret;
@ -46,6 +47,7 @@ int kdat_compat_sigreturn_test(void)
ret = syscall(SYS_arch_prctl, ARCH_MAP_VDSO_32, 1);
if (ret == -1 && errno == EEXIST)
return 1;
#endif
return 0;
}
#endif /* CONFIG_X86_64 */