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:   Wed, 2 Sep 2020 08:04:35 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Paras Sharma <parashar@...eaurora.org>
Cc:     Jiri Slaby <jslaby@...e.com>, linux-arm-msm@...r.kernel.org,
        linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
        akashast@...eaurora.org
Subject: Re: [PATCH] serial: qcom_geni_serial: To correct QUP Version
 detection logic

On Wed, Sep 02, 2020 at 11:26:51AM +0530, Paras Sharma wrote:
> The current implementation reduces the sampling rate by half
> if qup HW version is  greater is than 2.5 by checking if the
> geni SE major version is greater than 2 and geni SE minor version
> is greater than 5.
> 
> This implementation fails when the version is 3 or greater.
> 
> Hence new implementation checks if version is greater than or equal
> to 0x20050000 which would work for any future version.
> 
> Signed-off-by: Paras Sharma <parashar@...eaurora.org>
> ---
>  drivers/tty/serial/qcom_geni_serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Is this a v2 patch?  What changed from the first one?

> 
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index f0b1b47..e18b431 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -1000,7 +1000,7 @@ static void qcom_geni_serial_set_termios(struct uart_port *uport,
>  	sampling_rate = UART_OVERSAMPLING;
>  	/* Sampling rate is halved for IP versions >= 2.5 */
>  	ver = geni_se_get_qup_hw_version(&port->se);
> -	if (GENI_SE_VERSION_MAJOR(ver) >= 2 && GENI_SE_VERSION_MINOR(ver) >= 5)
> +	if (ver >= 0x20050000)

That's an odd "magic value", can't you use the existing macros to define
this somehow so it makes sense?

thanks,

greg k-h

Powered by blists - more mailing lists