diff options
author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2024-10-10 09:01:15 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-11-02 12:37:34 +0100 |
commit | 7821571be92f9c81f63d4639e652e85d258ce5f2 (patch) | |
tree | 44d55666e4b20a8ee047796fc80408c6ee859978 /arch/x86/include | |
parent | x86/vdso: Place vdso_data at beginning of vvar page (diff) | |
download | linux-7821571be92f9c81f63d4639e652e85d258ce5f2.tar.xz linux-7821571be92f9c81f63d4639e652e85d258ce5f2.zip |
x86/vdso: Access rng data from kernel without vvar
Remove the usage of the vvar _vdso_rng_data from the kernel-space code,
as the x86 vvar machinery is about to be removed.
The definition of the structure is unnecessary, as the data lives in a
page pre-allocated by the linker anyways.
The vdso user-space access to the rng data will be switched soon.
DEFINE_VVAR_SINGLE() is now unused. It will be removed later togehter
with the rest of vvar.h.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241010-vdso-generic-base-v1-13-b64f0842d512@linutronix.de
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/vdso/vsyscall.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/vvar.h | 4 |
2 files changed, 4 insertions, 2 deletions
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 |