From nobody Fri Jun 12 18:57:14 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 6DBC52BEC55 for ; Wed, 13 May 2026 06:33:04 +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=1778653985; cv=none; b=S1xnFK7rhR3u2czsmGsscetIIb7gpYmJD0G0E2KwzwUWGZkvsS4sWyGie7r+NLxrlpjKSItod0voKr/sL5JLSjAbs40hVHfXRgfVUEH9mZEwlb2zib08n66mnvf+eRWScpUA2OKkv1pmM9Yjg5hB9M00OQGO6B6TkX9fnAx0nw4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778653985; c=relaxed/simple; bh=c3cJvrzcK9SsrQ7Lc+To9T6GWj3tizOzle1YLhX/Ofk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=XTjpTVXpRgKZBybouGpN5d7LaoG3G36oeGpqTPcnEvN+BBLJDEVGpaZRlhCZsdgwny0O/gIyg+Kk+GFE0jSxUAQwGzqAcIOrjmIi7gU0k1FBWWA7yVeDh0x1VxejbRBCiOsp0o3V+KlyjDoNfB6hnvOhKRRqi1Y0uDLG9l1O530= 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=qpyU3ic4; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=eg0+W9yQ; 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="qpyU3ic4"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eg0+W9yQ" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1778653977; h=from:from: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; bh=VZod+ayfyPwkZPmL8XB7ejgLPIa3JeKt0JwjCjkSLrg=; b=qpyU3ic4XGGGEfiDrCD5mmU5VaO3j4cUpCDJgZi2bhF4hdrWvljb6x87b4FolGbFUKz4m2 7BSpZzxQAmCazahMyU6iXX8UA/xcYzPiSUXVXrObNpxxEp1hZtc9qDV5YP5I5BUb+rWu96 FOtLNoZOVetfu9UqfYwt1bMeHnBuXPsTl0LU79Leu+NwoS7UuVfQTLkgSx7Klp4+eRpSdG 99KZCp6tqAJ/4L3vNMokCJFMJ6XGCKU5Tsw2LvAvhyqprA9RasZjopB1wy/ugRfZL/XRKy lbhX6DXqluRrh9Ywp3pR3ugPKiQY8dUhb5y08pPmz4S9agHx6LqceGPIW51npg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1778653977; h=from:from: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; bh=VZod+ayfyPwkZPmL8XB7ejgLPIa3JeKt0JwjCjkSLrg=; b=eg0+W9yQYf70kAxE1epgUW7asgHtgKCml71P15i/+sg92/z2/qFyp2auY+8gw3tBgB48a6 jegmNr9fkYBR7NDQ== Date: Wed, 13 May 2026 08:32:46 +0200 Subject: [PATCH] vdso/datastore: Mark vdso_k_*_data pointers as __ro_after_init Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260513-vdso-ro-after-init-v1-1-4b51f74015a4@linutronix.de> X-B4-Tracking: v=1; b=H4sIAAAAAAAC/x3MQQqAIBBG4avErBuwpISuEi0k/2o2GmNEEN49a fkt3nspQwWZpuYlxS1ZUqzo2obWw8cdLKGaetOPZugs3yEn1sR+u6AsUS6Gdy4M8LAwVMNTscn zT+ellA+mgq2bZAAAAA== X-Change-ID: 20260513-vdso-ro-after-init-ea77d5eae3e0 To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1778653971; l=1785; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=c3cJvrzcK9SsrQ7Lc+To9T6GWj3tizOzle1YLhX/Ofk=; b=r12fU2AvRI2kNcVMR/gc2xkKMy3BuF0X7myuHSpfy+Fad81DJPkkZAyKUoBe1z4+h/wlqu7mP CRio9UyOv8TBzTD+9vhaWStqkSR9ZSEXMBxukzkoIJkg86GSFGMhhwK X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= These pointers are only modified once in vdso_setup_data_pages(), during the init phase. Make them read-only after that. Drop __refdata as that would conflict with __ro_after_init. Modpost does accept the reference from a __ro_after_init symbol to an __init one. Signed-off-by: Thomas Wei=C3=9Fschuh --- lib/vdso/datastore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vdso/datastore.c b/lib/vdso/datastore.c index cf5d784a4a5a..17d37b82ebc6 100644 --- a/lib/vdso/datastore.c +++ b/lib/vdso/datastore.c @@ -11,21 +11,21 @@ static u8 vdso_initdata[VDSO_NR_PAGES * PAGE_SIZE] __aligned(PAGE_SIZE) __= initdata =3D {}; =20 #ifdef CONFIG_GENERIC_GETTIMEOFDAY -struct vdso_time_data *vdso_k_time_data __refdata =3D +struct vdso_time_data *vdso_k_time_data __ro_after_init =3D (void *)&vdso_initdata[VDSO_TIME_PAGE_OFFSET * PAGE_SIZE]; =20 static_assert(sizeof(struct vdso_time_data) <=3D PAGE_SIZE); #endif /* CONFIG_GENERIC_GETTIMEOFDAY */ =20 #ifdef CONFIG_VDSO_GETRANDOM -struct vdso_rng_data *vdso_k_rng_data __refdata =3D +struct vdso_rng_data *vdso_k_rng_data __ro_after_init =3D (void *)&vdso_initdata[VDSO_RNG_PAGE_OFFSET * PAGE_SIZE]; =20 static_assert(sizeof(struct vdso_rng_data) <=3D PAGE_SIZE); #endif /* CONFIG_VDSO_GETRANDOM */ =20 #ifdef CONFIG_ARCH_HAS_VDSO_ARCH_DATA -struct vdso_arch_data *vdso_k_arch_data __refdata =3D +struct vdso_arch_data *vdso_k_arch_data __ro_after_init =3D (void *)&vdso_initdata[VDSO_ARCH_PAGES_START * PAGE_SIZE]; #endif /* CONFIG_ARCH_HAS_VDSO_ARCH_DATA */ =20 --- base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731 change-id: 20260513-vdso-ro-after-init-ea77d5eae3e0 Best regards, -- =20 Thomas Wei=C3=9Fschuh