Thread (54 messages) 54 messages, 7 authors, 2026-01-16

Re: [PATCH v5 17/34] random: vDSO: remove ifdeffery

From: Thomas Weißschuh <hidden>
Date: 2025-11-10 08:45:54
Also in: linux-arm-kernel, linux-kselftest, linux-mips, linux-s390, lkml, loongarch, sparclinux

On Sat, Nov 08, 2025 at 12:37:15AM +0100, Jason A. Donenfeld wrote:
On Thu, Nov 06, 2025 at 11:02:10AM +0100, Thomas Weißschuh wrote:
quoted
-#endif
+	if (IS_ENABLED(CONFIG_VDSO_GETRANDOM))
+		smp_store_release((unsigned long *)&vdso_k_rng_data->generation, next_gen + 1);
+
This is possible because vdso_k_rng_data is now defined in the C source
on all platforms and under all configurations, even if
!CONFIG_VDSO_GETRANDOM means it's null? Whereas before, some config's
headers didn't have this at all, so the #ifdef was necessary?
This is possible because vdso/datapage.h is now included unconditionally.
(Which was made possible by the previous cleanup patches in this series)
vdso_k_rng_data is only defined if CONFIG_VDSO_GETRANDOM=y but declared
unconditionally. If CONFIG_VDSO_GETRANDOM=n all references to the symbol
are optimized away by the compiler before the linker is invoked, so no
unresolved references are created.
If so, can you mention this in the commit message?
Will do.


Thomas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help