From nobody Sat Jul 25 20:46:39 2026 Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) (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 9C3C23769FE for ; Mon, 13 Jul 2026 23:35:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783985731; cv=none; b=ZxRC9DDlaAHiEQ3ieh7ZyATtu74/7NPtsBz52aZw8KQwnT8OY69sBnvEm643mFja1YtWsAhigDknNCqrT5dYBjDdwVjSkCGCZWyq+PR02t/C5avFehnXdj5J6yCav4d2JRSPWLK5Z2v8k4ApHB0zAb3pN4fODW1UJVZQv1M6mGQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783985731; c=relaxed/simple; bh=HEu+JS6e27UdjH9GE1tmfLwcK6GeSAghtWAw9k3aF4Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ni55Ib1XDsSd2PWRTNuyTcMVyuPnEBJ+NCsOlf922x4OL8BptQjC//0vvlMPC4J1gb45NUvAb7nfQ+Y8chhpvYWNgwb/o7JT/Ph4bw47DRbvS+w/twEq6gnIOAY+nqB8Pg9enWujSvsLHk4lVCn9h+4ycM0OHgYh6qvWodVghgM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=hMFS0A4s; arc=none smtp.client-ip=95.215.58.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="hMFS0A4s" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783985726; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=InV5x2tAQr64Dz1ODAuqp4ESdrQV5BGDt/M0iINGBP8=; b=hMFS0A4s+uSY8xvnRJyPutJ9wNOhFyepzoNmmsArDLNUi4Wu0OD7B7kQVNFANHcoDieK7w +sydJyvIGJkGo2jM2bQSPVFTCtwYt4X+LabN9p+gQsUq99egxagZqsy2MyfxSsiqst5ZrW mHA06ypWKCxxk7yzefdKmgQrV+lUcog= From: Thorsten Blum To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andrew Morton , Jonathan Corbet , Shuah Khan , Randy Dunlap Cc: x86@kernel.org, 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: Tue, 14 Jul 2026 01:34:24 +0200 Message-ID: <20260713233422.127348-6-thorsten.blum@linux.dev> In-Reply-To: <20260713233422.127348-5-thorsten.blum@linux.dev> References: <20260713233422.127348-5-thorsten.blum@linux.dev> 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=1214; i=thorsten.blum@linux.dev; h=from:subject; bh=HEu+JS6e27UdjH9GE1tmfLwcK6GeSAghtWAw9k3aF4Y=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFmhZVzc272KbzFURAU+1PBRj9m0fvMJ7lM1684pJTbvk JOazrGro5SFQYyLQVZMkeXBrB8zfEtrKjeZROyEmcPKBDKEgYtTACYiacvI0P1ZVca255b4/ABp s2cLZkc/uv6lbUPio/i9Ae7J73IOvWNkODGHwYpx/2+fGYvfHeq+xbJ/H79E1p9r1raCZ7MkvrI c5gIA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT 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 Jul 25 20:46:39 2026 Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (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 90733385D84 for ; Mon, 13 Jul 2026 23:35:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783985731; cv=none; b=QyCXDAkWygjberV+hPxNYStaoqJ4LHr/IW86C+I5LBiXUBcQzbMm2s7FgX77s/x4EcClBrw3LrQ4fKlAternwyE/U+2LtoSnX8+pGvMLcl9LcTkgWOyaYbpvWnz1/De9t2D+5l4K+uNt+0eGvynC7DsUWSiX45l/A8j5huwkDg8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783985731; c=relaxed/simple; bh=Jhyde+qVXhwYKT+jfqAojkE5MDc+zEv4Q/4BXY9Wek4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bDuovaRwb+3EFVYVQ2a5p1vmaXQdMcn2bQe5JshOCf/7zys18lcPp1fqRaSyPBHVZyt+JRwHBe4eo1v8ke+5vFAbSiG29MhfzD2c2ar5LVhmROIRAQk/yOgJ6SeNff1QdZA7gg0c7c5JdcixcslQP2Lm7jaUmnYonjIzZmQZK9I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=us1bp+RP; arc=none smtp.client-ip=95.215.58.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="us1bp+RP" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783985727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PH+ap9Z9jRyHTeU0JE3+i1OoIv68/HHTxd5g9JcEcPs=; b=us1bp+RPkonMUZZxUUEVxKxPBLUCgn2Q4dko7zeD5Is3wP17wEYbGzutlnb+UdysOScUJd IvpYVdVlqDP8f0sK4aVrd5YA07PmdOEq7NSZ0fe7u+jMVKSuKFkPiwqt1FxuxxEsOMKlEx 65Q3idmHPoUevsf0zPEDanbJ7BGNAlU= From: Thorsten Blum To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andrew Morton , Jonathan Corbet , Shuah Khan , Randy Dunlap Cc: x86@kernel.org, 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: Tue, 14 Jul 2026 01:34:25 +0200 Message-ID: <20260713233422.127348-7-thorsten.blum@linux.dev> In-Reply-To: <20260713233422.127348-5-thorsten.blum@linux.dev> References: <20260713233422.127348-5-thorsten.blum@linux.dev> 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=1839; i=thorsten.blum@linux.dev; h=from:subject; bh=Jhyde+qVXhwYKT+jfqAojkE5MDc+zEv4Q/4BXY9Wek4=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFmhZVzVHf2rE48VdrbOElj9hm9S1ErOSZdqP/31TJfWV zCZyhTWUcrCIMbFICumyPJg1o8ZvqU1lZtMInbCzGFlAhnCwMUpABOJtmT4H5WouPJrSt7yJXpi iUpigZtzRBoYbzr/kphtq3HjaPvJNEaGY9EP71oZy8WHv1jzb1WgYtSrvLy11r4eJtuyvT5ObZD nAgA= X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT 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 Jul 25 20:46:39 2026 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 A875A3B83E8; Mon, 13 Jul 2026 23:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783985741; cv=none; b=RIbAEDZdwg6ajnNWt4jMubJlZrYO5Yj28AjPeVENaPMxXXV7K1/U7/Gs6SCkReKUfaX1uufIiJfc3QYQlxBb8sxw0EU7lIgWliziYIJzAakrZJg7OzFITDuLMIcAUgvguHmDKnAk9dlDu9QqRxJtZC93UE9z3XKZn+L7Qlv3pfM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783985741; c=relaxed/simple; bh=InC2Ob/G4nuEO2jCESpqrqfJ6O7kWO0SzBJV9ZyCYVs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PedNsKm+2siq2MmahqOjlbbj6LXV/+wXZwIENqs4sxvkj8OjSlElUhNMRS2l/ioxA7/CYfNO0tmQeLZzIlCNTxRl7h1x94QSiINVBF2Gr/LqGVwisVWpPa+1nOGWp3iqf70xSTA0Pyo7EGGfZ26PxmDUCOX8rGo++Srhv4eQN6A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=edGOrYYn; arc=none smtp.client-ip=95.215.58.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="edGOrYYn" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1783985730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cIwLEttMqxETjzLJiAGOPU3xmr3RXS2AuNjyPF/Tv1U=; b=edGOrYYnMWbgwgHbECxFlLMU6FTFPWsUtTY7Ze78K33GY+0rKfAWpPXN697ApaA7SbhpOk 3ArG+Hl1HH4yZMDEbYJUKrrXElttftSM8/2qJpqaZrqWMQwrnHQt0lWcWA72HGoD7E/Ebz S2LHg14NYgXMLiQx1cKg8e3hBrfEJvc= From: Thorsten Blum To: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Andrew Morton , Jonathan Corbet , Shuah Khan , Randy Dunlap Cc: x86@kernel.org, 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: Tue, 14 Jul 2026 01:34:26 +0200 Message-ID: <20260713233422.127348-8-thorsten.blum@linux.dev> In-Reply-To: <20260713233422.127348-5-thorsten.blum@linux.dev> References: <20260713233422.127348-5-thorsten.blum@linux.dev> 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=1471; i=thorsten.blum@linux.dev; h=from:subject; bh=InC2Ob/G4nuEO2jCESpqrqfJ6O7kWO0SzBJV9ZyCYVs=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFmhZVxO33WF1pWyfPGRLg6L+Jgla277cWbJNT49gzybh PWGk007SlkYxLgYZMUUWR7M+jHDt7SmcpNJxE6YOaxMIEMYuDgFYCIJbxj+mR5W/KQtL6sftlrh eKbzon227aLfn5ncbjaf/MVWUHT3A0aGj8fNbRincnII8t6xPrpt78WYdYKONmvCl07k4c3prz/ GCQA= X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT 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 b5493a7f8f22..8a55ec37d066 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -8260,15 +8260,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!