From 08cbdefb020f4d575fd940865245ebdc5b33abcf Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Mon, 9 Jan 2017 20:19:07 +0300 Subject: [PATCH] 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 Signed-off-by: Dmitry Safonov Signed-off-by: Pavel Emelyanov Signed-off-by: Andrei Vagin --- criu/arch/x86/crtools.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/criu/arch/x86/crtools.c b/criu/arch/x86/crtools.c index ba0145b27..0c3851adc 100644 --- a/criu/arch/x86/crtools.c +++ b/criu/arch/x86/crtools.c @@ -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 */