From nobody Sat Sep 26 19:33:31 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 EA2F23E025E; Mon, 31 Aug 2026 10:18:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788171488; cv=none; b=ZehMSBIv4nypHsn/nfxICFPm46BU28m1RIaQxLQHR2jfbxtMR1ZlnOxAQuDuWTM2yPHTPNqPtXj67oxL9j8DTR5Dbx7IY8D5ft5aiOSZ/8YVKwGPn6f4U6s7rxQgohJDGIq4KaYYklMAHlc7WogkqQHhmHiqwiVcTkhiql2pu6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788171488; c=relaxed/simple; bh=cmLxbjdlWIw/eE3FfCT92cbjMvhCBcGJsc3ZMrBqxY0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EzncnwS+aBtrT7U6Boy0F6MCNmCvWkn57oUcRBM0t7bwjCnx+fA8gf9pAxPiqigg3kQb+8bvmVBeXtqeDyQW/F9knlYhTVhWdVar9zxWb7DmdNEXQ8Hx/G+lUt2wGbT6OP/8sexC4QwHnnyO/XqlxYmshM6HKhLKEXzNvy0bfI4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZzDOjJcm; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZzDOjJcm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 799FA1F00A3D; Mon, 31 Aug 2026 10:18:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788171486; bh=dx5le0XkmfnEd8/7dJ+rrW0bJpl7QKfeI+LxlYcrTMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZzDOjJcm/Rb1vCs8HMhJywa4Iyi+vMdEOir1TBzen6vq4s5NpxuXtjjLxJHvFDs75 AJsEvpwxqwIe0kJ6PnOe+4iEXIscVoe/5n5bAnwImBT/NYGG/rkbg+J2Sfk25886Mk 8nJRCvTT2eU4GKQeXoJcs6Dl938HAQm+bGYQT9IwVUo1yccwFZi/EryFtuuiBVtdCb WuEFjC5Sc/rWWHRaNytlIKBm4DmcZpJGBzdHB21ZPXOxc8ghBpxVvEteJmAMohJKAY yJ6rIn3QeJbRGymMDpQlPQyPkYoaQbhaM+gZ9xUpRxWgVDhU01/BlLJ48knGOQ3Hlz kq6ELsFFiblQg== From: Thorsten Blum To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andrew Morton , "Mike Rapoport (Microsoft)" , Jonathan Corbet , Shuah Khan , Randy Dunlap , Dapeng Mi , Marco Elver , Jeff Layton , Ethan Nelson-Moore , Eric Biggers Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thorsten Blum Subject: [PATCH RESEND 1/3] x86/vdso: Use kstrtouint() to validate vdso= boot parameter Date: Mon, 31 Aug 2026 12:16:59 +0200 Message-ID: <20260831101657.2947-6-blum@kernel.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260831101657.2947-5-blum@kernel.org> References: <20260831101657.2947-5-blum@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1206; i=blum@kernel.org; h=from:subject; bh=cmLxbjdlWIw/eE3FfCT92cbjMvhCBcGJsc3ZMrBqxY0=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFlTQ2bxbXy4nJfr8IVexpvbRWcH98R/fS83Z7a2U2nD1 tYVPVe5O0pZGMS4GGTFFFkezPoxw7e0pnKTScROmDmsTCBDGLg4BWAi9QkM/7PnHf/M1875M9b9 84zuwxuqll5z1AzMtUtWktnJ8JhN7znDP2NuBwGv9DkfkudvT82z1HV1XSvWtEEr8fPimLs1Ym5 LGQE= X-Developer-Key: i=blum@kernel.org; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace the deprecated simple_strtoul() with kstrtouint() when parsing the vdso=3D boot parameter. simple_strtoul() accepts partial input and silently converts invalid input to 0. Use kstrtouint() for strict input validation instead and reject malformed input. Accept only 0 and 1; warn and disable vDSO support otherwise. kstrtouint() converts the input string directly to an unsigned int, avoiding an implicit conversion when assigning to vdso64_enabled. Signed-off-by: Thorsten Blum --- arch/x86/entry/vdso/vma.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c index 18dfd80a81ef..c5c09c28388e 100644 --- a/arch/x86/entry/vdso/vma.c +++ b/arch/x86/entry/vdso/vma.c @@ -299,7 +299,11 @@ bool arch_syscall_is_vdso_sigreturn(struct pt_regs *re= gs) #ifdef CONFIG_X86_64 static __init int vdso_setup(char *s) { - vdso64_enabled =3D simple_strtoul(s, NULL, 0); + if (kstrtouint(s, 0, &vdso64_enabled) || vdso64_enabled > 1) { + pr_warn("vdso=3D values other than 0 and 1 are invalid; vdso disabled\n"= ); + vdso64_enabled =3D 0; + } + return 1; } __setup("vdso=3D", vdso_setup); From nobody Sat Sep 26 19:33:31 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 8C2AF3E025E; Mon, 31 Aug 2026 10:18:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788171492; cv=none; b=WM0oJcSALmNYjv4XVqqQL09tUqzb4sRRqjSAjGtRjWKonIWYiGwxBG1JhmgsqM0eC3acyBMdCAxii5MkSDweTsBH8w9NwZ+pfNKm4RzIr+Qy95TT06ZHR6SfO5mYFfeVJ5f0pNeKdYFA045ETGaBh3OqSNGvMKEKNEpNZnJz6xs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788171492; c=relaxed/simple; bh=0mLDPzyKPhCCvkaWXViaFb/YUNNqtEWp/d2c4J0GwxY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XOSbFdhLSmS5K817UHuH5+FxuD0cKcFudhA6UGqOV6lztBsGyrvNfcDcnw3+Qa6UEDTrVdiO4aTW1kcR8OjxROPgBQJYNYMxxjsQn4u8F3peHdYN5bsrHCkPvXmw5L9qvgDPJ3Zt3tYEGx/o9Cp9cDUT9ZQTDaNCDaw0hMpWXCE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eME6KTBg; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eME6KTBg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56F6F1F000E9; Mon, 31 Aug 2026 10:18:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788171491; bh=tKDm6NkBYuHXVCe45Wa7T6tPjflrflsWNHUHpKzMUAs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eME6KTBgvIFYLlIM6R2OClAnXz22xK7o4N38qhXJl6XhBh7QhR3eBq7N2DkYX1XxE /YVRFEr8lpCVIGIL2J+EZqxAkaEoOggi3bTUTgjNIJVj0s+WbuZJkxwmW3Bs5saHD5 2kUQVWlNlKi/0w4rRlq8ucMOaVRva1uwwmQNzNJlEyxfVM9lQbYLJFW2vYxsTHzncf oRLsuF7bZTekHwvnYPF4ZlXKty264WH+GGOok9pzNlEJ4HAcrquCz6jtG415Lwl7s5 mXPKHGM69dJG9GFF5UCv6w72HdSQuNMmP+yNCI5nOBT52j7hrkWmzE/iSLt0CbnAeH L7gbipXtcUSMg== From: Thorsten Blum To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andrew Morton , "Mike Rapoport (Microsoft)" , Jonathan Corbet , Shuah Khan , Randy Dunlap , Dapeng Mi , Marco Elver , Jeff Layton , Ethan Nelson-Moore , Eric Biggers Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thorsten Blum Subject: [PATCH RESEND 2/3] x86/vdso: Use kstrtouint() to validate vdso32= boot parameter Date: Mon, 31 Aug 2026 12:17:00 +0200 Message-ID: <20260831101657.2947-7-blum@kernel.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260831101657.2947-5-blum@kernel.org> References: <20260831101657.2947-5-blum@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1831; i=blum@kernel.org; h=from:subject; bh=0mLDPzyKPhCCvkaWXViaFb/YUNNqtEWp/d2c4J0GwxY=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFlTQ2bdyPn/kbVsWdWX63vT5YOqpScr9v3PaHI64qRqJ ZpqfEKho5SFQYyLQVZMkeXBrB8zfEtrKjeZROyEmcPKBDKEgYtTACbyvZbhf2md8MQOxdlxgfpL s0s+65vkmOTdLAhK1WD7MWWx/xaxOYwMxzZENYisqnTbevu2+6N3HxnSrJcsf7ZfVKG69ajGLf3 zrAA= X-Developer-Key: i=blum@kernel.org; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace the deprecated simple_strtoul() with kstrtouint() when parsing the vdso32=3D boot parameter and its X86_32 vdso=3D alias. simple_strtoul() accepts partial input and silently converts invalid input to 0. Use kstrtouint() for strict input validation instead and reject malformed input. Accept only 0 and 1; warn and disable vDSO support otherwise. kstrtouint() converts the input string directly to an unsigned int, avoiding an implicit conversion when assigning to vdso32_enabled. Update the vdso32=3D handler comment to reflect the supported values. Signed-off-by: Thorsten Blum --- arch/x86/entry/vdso/vdso32-setup.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/x86/entry/vdso/vdso32-setup.c b/arch/x86/entry/vdso/vdso3= 2-setup.c index 8894013eea1d..5f3e548ebf19 100644 --- a/arch/x86/entry/vdso/vdso32-setup.c +++ b/arch/x86/entry/vdso/vdso32-setup.c @@ -30,10 +30,8 @@ unsigned int __read_mostly vdso32_enabled =3D VDSO_DEFAU= LT; =20 static int __init vdso32_setup(char *s) { - vdso32_enabled =3D simple_strtoul(s, NULL, 0); - - if (vdso32_enabled > 1) { - pr_warn("vdso32 values other than 0 and 1 are no longer allowed; vdso di= sabled\n"); + if (kstrtouint(s, 0, &vdso32_enabled) || vdso32_enabled > 1) { + pr_warn("vdso32=3D values other than 0 and 1 are invalid; vdso disabled\= n"); vdso32_enabled =3D 0; } =20 @@ -41,9 +39,9 @@ static int __init vdso32_setup(char *s) } =20 /* - * For consistency, the argument vdso32=3D[012] affects the 32-bit vDSO + * For consistency, the argument vdso32=3D[01] affects the 32-bit vDSO * behavior on both 64-bit and 32-bit kernels. - * On 32-bit kernels, vdso=3D[012] means the same thing. + * On 32-bit kernels, vdso=3D[01] means the same thing. */ __setup("vdso32=3D", vdso32_setup); From nobody Sat Sep 26 19:33:31 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 BBCC32D781B; Mon, 31 Aug 2026 10:18:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788171499; cv=none; b=Ld99ARnVmIRsYS9b+5RZHjyWv/sGi9kQnQNv9vv1Dvur+FhOtzqO5/ML0X2I2E30dCotSQ/1lZYJAU2HWVcJ/9FRd8AlkaTTFi+rUmKhUsVIYVC010+/IRAb/DDPNxE/oZ7yFTMa7irOSRxxw04GD6qS58KrmMoXTyWvPAgjJ7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788171499; c=relaxed/simple; bh=5s6EUyxh8JHFqaodDHnqJiVh1EiqM58/P6lkzAvGh/k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=axsY8EJS3YsPbXYRPI+cQhmV7livnLLQ2B8uklfRx85rXCnxAzOs+2YiaDAuRA5g0s85sOJjeiF+6ehEnZQS3s1AD01cSXEqdSPKxuegXrNFhMNI0nfk4VlxN3tkD8bdPi4ltPD6/499WuwMkR3zlxSa5RVPO2yD+nOPYEWrptA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b+F22cQQ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b+F22cQQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CCC6E1F000E9; Mon, 31 Aug 2026 10:18:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788171498; bh=/USldvh6G0OAtolKZhKp1OxbNPDmJWwJbKHQDkkNUSc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=b+F22cQQeyK4/WnsnM1ma9HFib/V+v2Bz621TQ+SAg/lZ7X3LzgjY7LoqKO000+sj sz2odA0dSasiaFigL75kHk7Y4MV4bGs6w4iJp1xxn1wh6RTMqnXBVbsV/xxIdIE/k3 n43gDFJHWtaM4dB1j7RBvD3UkEN+u5KBQ82tooZWP9nkEUcPO+j44/AmTrVuUHvesX bQLs9GWw57PDx2T10wbpIvqXv84iXUYeyrvgYpFTmG0idg/WjTRFtvLDPZhJKOXio0 /RtkAGGMDR61BWBIF92504Ew2ElchV6QGrR2lKPiKUm4YSLYWcKqk6JC1SSVxkox7Q sq3oMcJnl2Jig== From: Thorsten Blum To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andrew Morton , "Mike Rapoport (Microsoft)" , Jonathan Corbet , Shuah Khan , Randy Dunlap , Dapeng Mi , Marco Elver , Jeff Layton , Ethan Nelson-Moore , Eric Biggers , Jakub Kicinski , Li RongQing Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thorsten Blum Subject: [PATCH RESEND 3/3] Documentation/arch/x86: Remove obsolete vdso32=2 compatibility note Date: Mon, 31 Aug 2026 12:17:01 +0200 Message-ID: <20260831101657.2947-8-blum@kernel.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260831101657.2947-5-blum@kernel.org> References: <20260831101657.2947-5-blum@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1463; i=blum@kernel.org; h=from:subject; bh=5s6EUyxh8JHFqaodDHnqJiVh1EiqM58/P6lkzAvGh/k=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFlTQ+aIn7Fp+7h0xbcOMbnIpIpDf23uxL1tWrByR+oGE XPzyAtqHaUsDGJcDLJiiiwPZv2Y4VtaU7nJJGInzBxWJpAhDFycAjCRLC6G/7GK/OlNml+6p/xe oPqzaOPXdu8TvgveCshkvHzR5/NNeDPDP9u/DLET85n6d1kvagmN0Ii0XXsn8wjH0l+Zn+3DglQ 3cQAA X-Developer-Key: i=blum@kernel.org; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Commit b0b49f2673f0 ("x86, vdso: Remove compat vdso support") removed compat vDSO support and documented vdso32=3D2 as an alias for vdso32=3D0. However, since commit c06989da39cd ("x86/vdso: Ensure vdso32_enabled gets set to valid values only"), vdso32_setup() accepts only 0 and 1. Remove the obsolete vdso32=3D2 compatibility note and document only the supported values. Reviewed-by: Randy Dunlap Signed-off-by: Thorsten Blum --- Documentation/admin-guide/kernel-parameters.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 68647ff4bdd2..793a85d879a5 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -8339,15 +8339,12 @@ Kernel parameters =20 vdso32=3D [X86] Control the 32-bit vDSO vdso32=3D1: enable 32-bit VDSO - vdso32=3D0 or vdso32=3D2: disable 32-bit VDSO + vdso32=3D0: disable 32-bit VDSO =20 See the help text for CONFIG_COMPAT_VDSO for more details. If CONFIG_COMPAT_VDSO is set, the default is vdso32=3D0; otherwise, the default is vdso32=3D1. =20 - For compatibility with older kernels, vdso32=3D2 is an - alias for vdso32=3D0. - Try vdso32=3D0 if you encounter an error that says: dl_main: Assertion `(void *) ph->p_vaddr =3D=3D _rtld_local._dl_sysinfo= _dso' failed!