From nobody Tue Apr 7 22:02:46 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 5E06C3DCDAA; Wed, 11 Mar 2026 14:51:37 +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=1773240700; cv=none; b=CVtLz9NIHAiUci1VAIOOYDH8BxnJnF4CaFsOjyGUBE8AWMmCWZ17Q9wiXukZXxAwo+CUgA8LZFPifU7rup++oGNo6dqaCenUfiwo9hnBR1+9Q9445dy0yVLRRyI5ySI1X3ZwW0AEjuKjM7eH3Pj1k9Ufu7pJ2mnwNubM7nHlOKQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773240700; c=relaxed/simple; bh=ge2LK3mb8QzMqgt5kvR2tdFybFULT7pOTGcngxNskg0=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=Ek8617kLykog/PlfbubWJ04VATjEcz+2SJutAcOVXDmOnUZI+Su1oF8Gp29yCYOwgPiVBEasQ/ceTIlCbx6IIewaSQrLT+ix3xYVa09WXoOFz3+X6EeZiYD6coBaL/62rhUoIwW7JN446bftLPmCw3xMiQzgOfUx4OB/vg27XDg= 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=IxpZWwWg; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=+Zhdrh/Y; 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="IxpZWwWg"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="+Zhdrh/Y" Date: Wed, 11 Mar 2026 14:51:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773240695; 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=5l8qe1qnGulCS55hJ91GnU3akTn5/Q821vliAV9jO6k=; b=IxpZWwWgCpfUhsuAY/4T6BpZ88BzwkVHHHwxmao7+/SgmVXRKs5VDJDYtE8QDj5P+1spaR LRw56zBaeQhBKWFxsGTbpVTEG6eBLftcH/hYDUO9tHGykzjXOclfz5IA/m42RoEbUhySQ4 Vq3o2JI3BOIEoKmluwlgyymNPS2devH6omFnXuCr8+hLLXw1JB584jEq5AZFHa9FwlDFVf qB7FnjAfhhOl04z1sialOpj3dxe7ByYFUl0/YQEx2CbcEFQfPwStT1PHjEJS2fHAdXj+Bs ZHCCkGr2Mgo3OPcCNYRX1HWDOIWtXumG8P921Y6kpwKghbsReopHpFOMkG6ZAg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773240695; 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=5l8qe1qnGulCS55hJ91GnU3akTn5/Q821vliAV9jO6k=; b=+Zhdrh/YfMZDkeQP1mpiGzLsKRO445HQG2nfyDCNSSoHKNT7/5K6jTaV1hmd9BF0kq0Qo3 j0rqJoLnAFgwwMAQ== 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 , "Borislav Petkov (AMD)" , "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: <177324069341.1647592.7152374887637290677.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: 260b98f75b618aa209998557dbd1d13dbc64bc89 Gitweb: https://git.kernel.org/tip/260b98f75b618aa209998557dbd1d13db= c64bc89 Author: Thomas Wei=C3=9Fschuh AuthorDate: Fri, 27 Feb 2026 07:44:41 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Wed, 11 Mar 2026 15:22:49 +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 Signed-off-by: Borislav Petkov (AMD) 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");