diff options
-rw-r--r-- | arch/x86/entry/vdso/vma.c | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/vdso/vsyscall.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/vvar.h | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c index b8fed8b8b9cc..8437906fd4b3 100644 --- a/arch/x86/entry/vdso/vma.c +++ b/arch/x86/entry/vdso/vma.c @@ -39,7 +39,6 @@ struct vdso_data *arch_get_vdso_data(void *vvar_page) #undef EMIT_VVAR DEFINE_VVAR(struct vdso_data, _vdso_data); -DEFINE_VVAR_SINGLE(struct vdso_rng_data, _vdso_rng_data); unsigned int vclocks_used __read_mostly; diff --git a/arch/x86/include/asm/vdso/vsyscall.h b/arch/x86/include/asm/vdso/vsyscall.h index a1f916b18400..ce8d5c81ebf4 100644 --- a/arch/x86/include/asm/vdso/vsyscall.h +++ b/arch/x86/include/asm/vdso/vsyscall.h @@ -21,7 +21,7 @@ struct vdso_data *__x86_get_k_vdso_data(void) static __always_inline struct vdso_rng_data *__x86_get_k_vdso_rng_data(void) { - return &_vdso_rng_data; + return (void *)&__vvar_page + __VDSO_RND_DATA_OFFSET; } #define __arch_get_k_vdso_rng_data __x86_get_k_vdso_rng_data diff --git a/arch/x86/include/asm/vvar.h b/arch/x86/include/asm/vvar.h index 01e60e0f671e..fe3434d3b5b1 100644 --- a/arch/x86/include/asm/vvar.h +++ b/arch/x86/include/asm/vvar.h @@ -19,6 +19,8 @@ #ifndef _ASM_X86_VVAR_H #define _ASM_X86_VVAR_H +#define __VDSO_RND_DATA_OFFSET 640 + #ifdef EMIT_VVAR /* * EMIT_VVAR() is used by the kernel linker script to put vvars in the @@ -62,7 +64,7 @@ DECLARE_VVAR(0, struct vdso_data, _vdso_data) #if !defined(_SINGLE_DATA) #define _SINGLE_DATA -DECLARE_VVAR_SINGLE(640, struct vdso_rng_data, _vdso_rng_data) +DECLARE_VVAR_SINGLE(__VDSO_RND_DATA_OFFSET, struct vdso_rng_data, _vdso_rng_data) #endif #undef DECLARE_VVAR |