Re: [PATCH v2 03/17] vdso: Add __arch_get_k_vdso_rng_data()

From
Jason A. Donenfeld <Jason@zx2c4.com>
Date
2024-08-26 07:24:29
Also in
linux-arch, linux-fsdevel, linux-kselftest, linux-mm, linux-trace-kernel, lkml
Reply to
Christophe Leroy, 2024-08-22
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 <redacted>
---
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
Thread (65 messages) 65 messages, 10 authors, last reply 2024-08-30
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help