mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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
57 lines
1.3 KiB
C
57 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_GENERIC_VSYSCALL_H
|
|
#define __ASM_GENERIC_VSYSCALL_H
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#ifdef CONFIG_GENERIC_VDSO_DATA_STORE
|
|
|
|
#ifndef __arch_get_vdso_u_time_data
|
|
static __always_inline const struct vdso_time_data *__arch_get_vdso_u_time_data(void)
|
|
{
|
|
return 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
|
|
static __always_inline struct vdso_data *__arch_get_k_vdso_data(void)
|
|
{
|
|
return NULL;
|
|
}
|
|
#endif /* __arch_get_k_vdso_data */
|
|
#define vdso_k_time_data __arch_get_k_vdso_data()
|
|
|
|
#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
|
|
static __always_inline void __arch_update_vsyscall(struct vdso_data *vdata)
|
|
{
|
|
}
|
|
#endif /* __arch_update_vsyscall */
|
|
|
|
#ifndef __arch_sync_vdso_data
|
|
static __always_inline void __arch_sync_vdso_data(struct vdso_data *vdata)
|
|
{
|
|
}
|
|
#endif /* __arch_sync_vdso_data */
|
|
|
|
#endif /* !__ASSEMBLY__ */
|
|
|
|
#endif /* __ASM_GENERIC_VSYSCALL_H */
|