diff options
| author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-02-04 13:05:38 +0100 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2025-02-21 09:54:01 +0100 |
| commit | 51d6ca373f459fa6c91743e14ae69854d844aa38 (patch) | |
| tree | 72ff45b96b2ce8938aa8676fcd5a6ac7fa5791e7 /include/asm-generic | |
| parent | df7fcbefa71090a276fb841ffe19b8e5f12b4767 (diff) | |
| download | lwn-51d6ca373f459fa6c91743e14ae69854d844aa38.tar.gz lwn-51d6ca373f459fa6c91743e14ae69854d844aa38.zip | |
vdso: Add generic random data storage
Extend the generic vDSO data storage with a page for the random state data.
The random state data is stored in a dedicated page, as the existing
storage page is only meant for time-related, time-namespace-aware data.
This simplifies to access logic to not need to handle time namespaces
anymore and also frees up more space in the time-related page.
In case further generic vDSO data store is required it can be added to
the random state page.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250204-vdso-store-rng-v3-6-13a4669dfc8c@linutronix.de
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/vdso/vsyscall.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-generic/vdso/vsyscall.h b/include/asm-generic/vdso/vsyscall.h index ac5b93b91993..a5f973e4e272 100644 --- a/include/asm-generic/vdso/vsyscall.h +++ b/include/asm-generic/vdso/vsyscall.h @@ -13,6 +13,13 @@ static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data( } #endif +#ifndef __arch_get_vdso_u_rng_data +static __always_inline const struct vdso_rng_data *__arch_get_vdso_u_rng_data(void) +{ + return &vdso_u_rng_data; +} +#endif + #else /* !CONFIG_GENERIC_VDSO_DATA_STORE */ #ifndef __arch_get_k_vdso_data @@ -25,6 +32,11 @@ static __always_inline struct vdso_data *__arch_get_k_vdso_data(void) #define __arch_get_vdso_u_time_data __arch_get_vdso_data +#ifndef __arch_get_vdso_u_rng_data +#define __arch_get_vdso_u_rng_data() __arch_get_vdso_rng_data() +#endif +#define vdso_k_rng_data __arch_get_k_vdso_rng_data() + #endif /* CONFIG_GENERIC_VDSO_DATA_STORE */ #ifndef __arch_update_vsyscall |
