lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 2 Jan 2018 15:50:47 +0100
From:   Johan Hovold <johan@...nel.org>
To:     Mikhail Zaytsev <flashed@...l.ru>
Cc:     Johan Hovold <johan@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] USB: serial: ark3116.c: Remove unused TIOCSSERIAL
 ioctl case.

On Wed, Dec 13, 2017 at 04:44:55PM +0300, Mikhail Zaytsev wrote:
> The patch removes unused TIOCSSERIAL ioctl case and adds the default block 
> to the switch.
> 
> Signed-off-by: Mikhail Zaytsev <flashed@...l.ru>
> ---
>  drivers/usb/serial/ark3116.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
> index 23d46ef87..2e957c76f 100644
> --- a/drivers/usb/serial/ark3116.c
> +++ b/drivers/usb/serial/ark3116.c
> @@ -418,10 +418,8 @@ static int ark3116_ioctl(struct tty_struct *tty,
>  			return -EFAULT;
>  
>  		return 0;
> -	case TIOCSSERIAL:
> -		if (copy_from_user(&serstruct, user_arg, sizeof(serstruct)))
> -			return -EFAULT;
> -		return 0;
> +	default:
> +		break;
>  	}
>  
>  	return -ENOIOCTLCMD;

This will make the ioctl return -ENOTTY to user space (e.g. setserial),
which I guess should be fine as TIOCSSERIAL really isn't supported for
these devices currently.

But you should at least mention this changed behaviour in the commit
message.

Please also drop the ".c" part from the subject prefix while at it.

Thanks,
Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ