• Christophe Leroy's avatar
    random: vDSO: add __arch_get_k_vdso_rng_data() helper for data page access · b757959f
    Christophe Leroy authored
    _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 the declaration in a C file. vma.c looks like
    the most appropriate candidate. We don't need to replace the definitions
    in vsyscall.h by declarations as declarations are already in asm/vvar.h.
    Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
    Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
    b757959f
random.c 52.7 KB