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] [day] [month] [year] [list]
Date:	Mon, 25 Apr 2016 12:33:17 +0200
From:	Johan Hovold <johan@...nel.org>
To:	Konstantin Shkolnyy <konstantin.shkolnyy@...il.com>
Cc:	johan@...nel.org, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND 4/5] USB: serial: cp210x: Prepared get_termios()
 for adding error handling

On Sun, Apr 24, 2016 at 12:09:30PM -0500, Konstantin Shkolnyy wrote:
> Replaced several register write calls with one, to simplify adding error
> handling.
> 
> Signed-off-by: Konstantin Shkolnyy <konstantin.shkolnyy@...il.com>
> ---
>  drivers/usb/serial/cp210x.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
> index b2321a7..58cffc9 100644
> --- a/drivers/usb/serial/cp210x.c
> +++ b/drivers/usb/serial/cp210x.c
> @@ -692,6 +692,7 @@ static void cp210x_get_termios_port(struct usb_serial_port *port,

Instead of cleaning up cp210x_get_termios I think you should consider
removing it.

It is used to read the current settings from the device and in case we
have a tty at open, to update the termios settings to match.

Instead you should just make sure that the device settings match
termios (and this is in fact already implemented, but done after
retrieving the settings).

You can also implement the init_termios callback to provide defaults
that match the hardware reset values.

Thanks,
Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ