[CRIU] [PATCH 20/32] x86/vdso: Initialize timens 64-bit vdso

Dmitry Safonov dima at arista.com
Wed Feb 6 03:10:54 MSK 2019


Initialize both 64-bit VDSO(s): host .so and timens one that has code
for adding timens offsets.

Signed-off-by: Dmitry Safonov <dima at arista.com>
---
 arch/x86/entry/vdso/vma.c   | 4 ++++
 arch/x86/include/asm/vdso.h | 6 ++++++
 2 files changed, 10 insertions(+)

diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index d1031db94093..56a62076a320 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
@@ -343,6 +343,10 @@ static int __init init_vdso(void)
 {
 	init_vdso_image(&vdso_image_64);
 
+#ifdef CONFIG_TIME_NS
+	init_vdso_image(&vdso_image_64_timens);
+#endif
+
 #ifdef CONFIG_X86_X32_ABI
 	init_vdso_image(&vdso_image_x32);
 #endif
diff --git a/arch/x86/include/asm/vdso.h b/arch/x86/include/asm/vdso.h
index 619322065b8e..b6a1a028ac62 100644
--- a/arch/x86/include/asm/vdso.h
+++ b/arch/x86/include/asm/vdso.h
@@ -32,6 +32,9 @@ struct vdso_image {
 
 #ifdef CONFIG_X86_64
 extern const struct vdso_image vdso_image_64;
+#ifdef CONFIG_TIME_NS
+extern const struct vdso_image vdso_image_64_timens;
+#endif
 #endif
 
 #ifdef CONFIG_X86_X32
@@ -40,6 +43,9 @@ extern const struct vdso_image vdso_image_x32;
 
 #if defined CONFIG_X86_32 || defined CONFIG_COMPAT
 extern const struct vdso_image vdso_image_32;
+#ifdef CONFIG_TIME_NS
+extern const struct vdso_image vdso_image_32_timens;
+#endif
 #endif
 
 extern void __init init_vdso_image(const struct vdso_image *image);
-- 
2.20.1



More information about the CRIU mailing list