From nobody Thu Apr 9 03:28:41 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 844813D1CDF; Wed, 11 Mar 2026 09:31:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773221476; cv=none; b=BWsqSBmU70C+1IRXlCdekWadxXsu/MUDj33nNZI0giT7oDA2k/6ZTuASeQS5YtS9iNvqP0t5qdDEEW+BPNezJUBLMiHvoZHa7DsAfu+xP9EU1EjqetMDKSc+i9p8A3N3jI4dL4/OyJ/VK0b/SIb3fCAtb+xMhbYXsr7wa/ziTAU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773221476; c=relaxed/simple; bh=9T7O6CgyfLtiv2y38IUuzX2NVcvzZT7Ycj/2i1o+9Io=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=Ho26CAU7tbh6bMFJP4cINo0QJ+o4izIg01QoAZyD2rHI4B6tIOWciBS6qtsZwx3tP6WfLwRdISTdT4xHr+XDDF/VR7Ckzsdg50FlEdhNiMeVJycJpRck4Inlsy45vGl/L6Bt9eoIUVK+eRXR1IkZDH2sFK2AVgQn1ADADUtVNt8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=n3937u6M; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=eITtynl2; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="n3937u6M"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eITtynl2" Date: Wed, 11 Mar 2026 09:31:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773221474; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TH6jDgcvdUU9Uwm2LFLKNQVaV3/RwUshax7znp5J1q8=; b=n3937u6MuQ8TJHUy/eCQX+tmpGgYMbRS8DFVK3p1dWhszQ//FCxae+ExCQHZEPNXw9kup+ tL463ZKsnXcV7I6FoFLtZ+EZZ1X/mnK9OWsWL4IdrCCOES4P9G8xq3ChWYPtGg1jt96wNl G8GDiJaF81djwxSYe0ED0FMfZPlumSAqRF0yEu9ia6Y/vlGHv6Z0/1fEm1QO1Z0RjrAVd6 QcKXPmJk+fo8cfKWJm7mQ5h1IO7fIrOLDVyRJUz0KTw6aHVNJ5DqCkEgVuln1yw+Ju4wHe gLlM2YLLfXUYm68saJe6+udWP/zd9qS8arQWDMh8lW2RR6L9I6abvFbZG0QMZw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773221474; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TH6jDgcvdUU9Uwm2LFLKNQVaV3/RwUshax7znp5J1q8=; b=eITtynl2h71kZTSbcveY4oDCwaLPSI9Co7gfGr94rU84q67Pd4fOzWvHegLRgS97OKTqlk e7Hnog6vTLWxdSCg== From: tip-bot2 for Thomas =?utf-8?q?Wei=C3=9Fschuh?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/vdso] random: vDSO: Remove ifdeffery Cc: thomas.weissschuh@linutronix.de, Thomas Gleixner , "Jason A. Donenfeld" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260227-vdso-header-cleanups-v2-15-35d60acf7410@linutronix.de> References: <20260227-vdso-header-cleanups-v2-15-35d60acf7410@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177322147280.1647592.12102755147347865641.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/vdso branch of tip: Commit-ID: 4da5ad41949ee8706a604163777e10d1beabf9b5 Gitweb: https://git.kernel.org/tip/4da5ad41949ee8706a604163777e10d1b= eabf9b5 Author: Thomas Wei=C3=9Fschuh AuthorDate: Fri, 27 Feb 2026 07:44:41 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 11 Mar 2026 10:27:39 +01:00 random: vDSO: Remove ifdeffery Recent cleanups of the vDSO headers allow the unconditional inclusion of vdso/datapage.h and the declarations it provides. This also means that the declaration of vdso_k_rng_data is always visible and its usage does not need to be guarded by ifdefs anymore. Instead use IS_ENABLED(). Signed-off-by: Thomas Wei=C3=9Fschuh Signed-off-by: Thomas Gleixner Reviewed-by: Jason A. Donenfeld Link: https://patch.msgid.link/20260227-vdso-header-cleanups-v2-15-35d60acf= 7410@linutronix.de --- drivers/char/random.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/char/random.c b/drivers/char/random.c index 304cdab..b4da1fb 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -56,9 +56,7 @@ #include #include #include -#ifdef CONFIG_VDSO_GETRANDOM #include -#endif #include #include #include @@ -267,7 +265,7 @@ static void crng_reseed(struct work_struct *work) if (next_gen =3D=3D ULONG_MAX) ++next_gen; WRITE_ONCE(base_crng.generation, next_gen); -#ifdef CONFIG_VDSO_GETRANDOM + /* base_crng.generation's invalid value is ULONG_MAX, while * vdso_k_rng_data->generation's invalid value is 0, so add one to the * former to arrive at the latter. Use smp_store_release so that this @@ -281,8 +279,9 @@ static void crng_reseed(struct work_struct *work) * because the vDSO side only checks whether the value changed, without * actually using or interpreting the value. */ - smp_store_release((unsigned long *)&vdso_k_rng_data->generation, next_gen= + 1); -#endif + if (IS_ENABLED(CONFIG_VDSO_GETRANDOM)) + smp_store_release((unsigned long *)&vdso_k_rng_data->generation, next_ge= n + 1); + if (!static_branch_likely(&crng_is_ready)) crng_init =3D CRNG_READY; spin_unlock_irqrestore(&base_crng.lock, flags); @@ -732,9 +731,8 @@ static void __cold _credit_init_bits(size_t bits) if (system_dfl_wq) queue_work(system_dfl_wq, &set_ready); atomic_notifier_call_chain(&random_ready_notifier, 0, NULL); -#ifdef CONFIG_VDSO_GETRANDOM - WRITE_ONCE(vdso_k_rng_data->is_ready, true); -#endif + if (IS_ENABLED(CONFIG_VDSO_GETRANDOM)) + WRITE_ONCE(vdso_k_rng_data->is_ready, true); wake_up_interruptible(&crng_init_wait); kill_fasync(&fasync, SIGIO, POLL_IN); pr_notice("crng init done\n");