Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp9177519ybc; Sat, 30 Nov 2019 02:33:34 -0800 (PST) X-Google-Smtp-Source: APXvYqwkz9MTJUMre3+y48ickdaZNRWChjNxbMMzbCYCMbgFlotTbFc/SPUc7JUp4+Hi/qavWbeD X-Received: by 2002:a05:6402:149a:: with SMTP id e26mr8008080edv.198.1575110014047; Sat, 30 Nov 2019 02:33:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575110014; cv=none; d=google.com; s=arc-20160816; b=iPYch+GD6GnWjpZIybyibp54gvc48PXwmRQxfGLrXYCXtWT1XJMtDHBYQQ1q5hEUrs 4OO0DTjbPgDU5yKpWxlt8lhYuYYJPAharnTH/lI/uW38Wm4jrnU4qGyG1EAp0mYHuzN8 8DjTvSaCy3q3tfV7FkHjmqSL5DPPv5fuHU8NkPeKY6uW0WqCuFRQZ0KBugxUlrhzF7tu BnIO+qMBhi/YrKySfbZaYa5uH98z9OVaeilLY+pKtEC10hAOATQvoO3bZSrMpvd4xNou khRddWDdCjLdu86puT5XLE7Nfdtmr1yvr3XQVuoIDXTx9qPd+UgcVm0RPeaMWjjLXCyQ Rf6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=crY+PhfG9g95hZy92TF1x4M5rhiINJix2AXDRRpQv+g=; b=0xJmeJ90axiovKH3e5JlUVSmkk4Em0/9o7AR47d2ehgB6myVV/vra4U+oBkyGv9/gR g4J3GVy7RJ6N930TZsCataVfQ2WcNTYZEfhi/IMYMgUM1ijrLasoAS2szt9HTZraga6x m7gAjwbNSBrd6agBhfDFMznFkopsifKuUYLx7OqYjOF2TjeIPKYcuzHvwe9GLTolGZ9/ O2VJHbS0i6JOlhwiAlWBg4dDDMU5aJsQEAvdGoWqg2DDSq1gogKh3vRZl+j4jJgkKckQ Tjzma+rCp44kiX8xhx7adyXqZFXPKA5Ox5ct3wEf2AhI3ZRwDtKunxOic6U2mZ5graa5 im/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dk20si11365538edb.413.2019.11.30.02.32.33; Sat, 30 Nov 2019 02:33:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725985AbfK3K2H (ORCPT + 99 others); Sat, 30 Nov 2019 05:28:07 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:39984 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725792AbfK3K2G (ORCPT ); Sat, 30 Nov 2019 05:28:06 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id B2AFF1C2566; Sat, 30 Nov 2019 11:28:04 +0100 (CET) Date: Sat, 30 Nov 2019 11:28:04 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Al Viro , Sasha Levin Subject: Re: [PATCH 4.19 030/306] synclink_gt(): fix compat_ioctl() Message-ID: <20191130102804.GA27380@duo.ucw.cz> References: <20191127203114.766709977@linuxfoundation.org> <20191127203116.924730296@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HlL+5n6rz5pIUxbD" Content-Disposition: inline In-Reply-To: <20191127203116.924730296@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --HlL+5n6rz5pIUxbD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > From: Al Viro >=20 > [ Upstream commit 27230e51349fde075598c1b59d15e1ff802f3f6e ] >=20 > compat_ptr() for pointer-taking ones... >=20 > Signed-off-by: Al Viro > Signed-off-by: Sasha Levin > +++ b/drivers/tty/synclink_gt.c > @@ -1186,14 +1186,13 @@ static long slgt_compat_ioctl(struct tty_struct *= tty, > unsigned int cmd, unsigned long arg) > { > struct slgt_info *info =3D tty->driver_data; > - int rc =3D -ENOIOCTLCMD; > + int rc; > =20 > if (sanity_check(info, tty->name, "compat_ioctl")) > return -ENODEV; > DBGINFO(("%s compat_ioctl() cmd=3D%08X\n", info->device_name, cmd)); > =20 > switch (cmd) { > - > case MGSL_IOCSPARAMS32: > rc =3D set_params32(info, compat_ptr(arg)); > break; > @@ -1213,18 +1212,11 @@ static long slgt_compat_ioctl(struct tty_struct *= tty, > case MGSL_IOCWAITGPIO: > case MGSL_IOCGXSYNC: > case MGSL_IOCGXCTRL: > - case MGSL_IOCSTXIDLE: > - case MGSL_IOCTXENABLE: > - case MGSL_IOCRXENABLE: > - case MGSL_IOCTXABORT: > - case TIOCMIWAIT: > - case MGSL_IOCSIF: > - case MGSL_IOCSXSYNC: > - case MGSL_IOCSXCTRL: > - rc =3D ioctl(tty, cmd, arg); > + rc =3D ioctl(tty, cmd, (unsigned long)compat_ptr(arg)); > break; > + default: > + rc =3D ioctl(tty, cmd, arg); > } Ok, so this used to only pass select calls to ioctl() and now it passes everything thanks to default: marking. I guess that's suitable for mainline, but is it also suitable for -stable? Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --HlL+5n6rz5pIUxbD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCXeJENAAKCRAw5/Bqldv6 8lAmAKC3P9bd/9OUYHd8vx2WoqPxYOetnACdGo+Jm0+fwwF1UP5zdcy8M2a54+k= =Vs55 -----END PGP SIGNATURE----- --HlL+5n6rz5pIUxbD--