[PATCH v2 03/17] vdso: Add __arch_get_k_vdso_rng_data()
Jason A. Donenfeld
Jason at zx2c4.com
Mon Aug 26 17:24:16 AEST 2024
On Thu, Aug 22, 2024 at 09:13:11AM +0200, Christophe Leroy wrote:
> _vdso_data is specific to x86 and __arch_get_k_vdso_data() is provided
> so that all architectures can provide the requested pointer.
>
> Do the same with _vdso_rng_data, provide __arch_get_k_vdso_rng_data()
> and don't use x86 _vdso_rng_data directly.
>
> Until now vdso/vsyscall.h was only included by time/vsyscall.c but now
> it will also be included in char/random.c, leading to a duplicate
> declaration of _vdso_data and _vdso_rng_data.
>
> To fix this issue, move declaration in a C file. vma.c looks like the
> most appropriate candidate. Don't need to replace the definitions in
> vsyscall.h by declarations as declarations are already in asm/vvar.h
>
> Signed-off-by: Christophe Leroy <christophe.leroy at csgroup.eu>
> ---
> v2: Move x86 DEFINE_VVAR(_vdso_data) and DEFINE_VVAR(_vdso_rng_data) in vma.c
Thanks, this seems sane to me. I'll apply this now to random.git as a
fix; it should have been done this way before and is going to be a
headache to coordinate later.
Jason
More information about the Linuxppc-dev
mailing list