return ret;
 }
 
+#ifdef CONFIG_TIME_NS
+static __always_inline const struct vdso_data *__arch_get_timens_vdso_data(void)
+{
+       const struct vdso_data *ret;
+
+       /* See __arch_get_vdso_data(). */
+       asm volatile("mov %0, %1" : "=r"(ret) : "r"(_timens_data));
+
+       return ret;
+}
+#endif
+
 #endif /* !__ASSEMBLY__ */
 
 #endif /* __ASM_VDSO_GETTIMEOFDAY_H */
 
 #endif /* CONFIG_COMPAT_VDSO */
 };
 
+enum vvar_pages {
+       VVAR_DATA_PAGE_OFFSET,
+       VVAR_TIMENS_PAGE_OFFSET,
+       VVAR_NR_PAGES,
+};
+
 struct vdso_abi_info {
        const char *name;
        const char *vdso_code_start;
 }
 
 #ifdef CONFIG_TIME_NS
+struct vdso_data *arch_get_vdso_data(void *vvar_page)
+{
+       return (struct vdso_data *)(vvar_page);
+}
+
 /*
  * The vvar mapping contains data for a specific time namespace, so when a task
  * changes namespace we must unmap its vvar data for the old namespace.
        unsigned long gp_flags = 0;
        void *ret;
 
+       BUILD_BUG_ON(VVAR_NR_PAGES != __VVAR_PAGES);
+
        vdso_text_len = vdso_info[abi].vdso_pages << PAGE_SHIFT;
        /* Be sure to map the data page */
-       vdso_mapping_len = vdso_text_len + PAGE_SIZE;
+       vdso_mapping_len = vdso_text_len + VVAR_NR_PAGES * PAGE_SIZE;
 
        vdso_base = get_unmapped_area(NULL, 0, vdso_mapping_len, 0, 0);
        if (IS_ERR_VALUE(vdso_base)) {
                goto up_fail;
        }
 
-       ret = _install_special_mapping(mm, vdso_base, PAGE_SIZE,
+       ret = _install_special_mapping(mm, vdso_base, VVAR_NR_PAGES * PAGE_SIZE,
                                       VM_READ|VM_MAYREAD|VM_PFNMAP,
                                       vdso_info[abi].dm);
        if (IS_ERR(ret))
        if (IS_ENABLED(CONFIG_ARM64_BTI_KERNEL) && system_supports_bti())
                gp_flags = VM_ARM64_BTI;
 
-       vdso_base += PAGE_SIZE;
+       vdso_base += VVAR_NR_PAGES * PAGE_SIZE;
        mm->context.vdso = (void *)vdso_base;
        ret = _install_special_mapping(mm, vdso_base, vdso_text_len,
                                       VM_READ|VM_EXEC|gp_flags|