From: Thomas Weißschuh Date: Thu, 10 Oct 2024 07:01:13 +0000 (+0200) Subject: x86/vdso: Use __arch_get_vdso_data() to access vdso data X-Git-Tag: v6.13-rc1~172^2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd937454d905fad9fcbeccd35ecfc8c3c096fe76;p=thirdparty%2Flinux.git x86/vdso: Use __arch_get_vdso_data() to access vdso data The implementation details of the vdso_data access will change. Prepare for that by using the existing helper function. Signed-off-by: Thomas Weißschuh Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20241010-vdso-generic-base-v1-11-b64f0842d512@linutronix.de --- diff --git a/arch/x86/include/asm/vdso/getrandom.h b/arch/x86/include/asm/vdso/getrandom.h index ff5334ad32a0f..ecdcdbcd33925 100644 --- a/arch/x86/include/asm/vdso/getrandom.h +++ b/arch/x86/include/asm/vdso/getrandom.h @@ -32,8 +32,8 @@ static __always_inline ssize_t getrandom_syscall(void *buffer, size_t len, unsig static __always_inline const struct vdso_rng_data *__arch_get_vdso_rng_data(void) { - if (IS_ENABLED(CONFIG_TIME_NS) && __vdso_data->clock_mode == VDSO_CLOCKMODE_TIMENS) - return (void *)&__vdso_rng_data + ((void *)&__timens_vdso_data - (void *)&__vdso_data); + if (IS_ENABLED(CONFIG_TIME_NS) && __arch_get_vdso_data()->clock_mode == VDSO_CLOCKMODE_TIMENS) + return (void *)&__vdso_rng_data + ((void *)&__timens_vdso_data - (void *)__arch_get_vdso_data()); return &__vdso_rng_data; }