[CRIU] [PATCH] tls: write GDT entry number to logs

Dmitry Safonov dsafonov at virtuozzo.com
Tue Dec 13 12:21:10 PST 2016


Sadly, it looks like gcc v6.1 adds some relocation issue to
arch_get_tls(). While v4.8 on which I tested localy and on Travis-CI,
and clang produce expected code, v6.1 does not.
Adding this pr_debug() eliminates this issue.

This is highly temporary solution, I'll work on more reliable fix for
this, but yet not sure where the bug is (compel relocation?).
Should unblock Jenkins and fix building with v6.1 for awhile:
https://ci.openvz.org/job/CRIU/job/CRIU-x86_64/branch/criu-dev/

Tested with gcc v6.1, Travis clang/gcc v4.8:
https://travis-ci.org/0x7f454c46/criu/builds/183711011

Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 criu/arch/x86/include/asm/parasite.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/criu/arch/x86/include/asm/parasite.h b/criu/arch/x86/include/asm/parasite.h
index 2385ec16d061..bf7c9627601e 100644
--- a/criu/arch/x86/include/asm/parasite.h
+++ b/criu/arch/x86/include/asm/parasite.h
@@ -75,6 +75,7 @@ static void arch_get_tls(tls_t *ptls)
 		builtin_memset(d, 0, sizeof(user_desc_t));
 		d->seg_not_present = 1;
 		d->entry_number = GDT_ENTRY_TLS_MIN + i;
+		pr_debug("Dumping #%d GDT entry\n", d->entry_number);
 		arch_get_user_desc(d);
 		builtin_memcpy(&ptls->desc[i], d, sizeof(user_desc_t));
 	}
-- 
2.10.2



More information about the CRIU mailing list