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:   Tue, 4 Apr 2017 10:07:11 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Martin Kepplinger <martink@...teo.de>
Cc:     hverkuil@...all.nl, mchehab@...nel.org,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] input: touchscreen: sur40: fix bad endianness handling
 in sur40_poll

On Tue, Apr 04, 2017 at 03:06:17PM +0200, Martin Kepplinger wrote:
> sparse says:
> 
>   sur40.c:372:40: warning: restricted __le32 degrades to integer
> 
> the header's data is __le32 so we need to convert it before comparing.
> 
> Signed-off-by: Martin Kepplinger <martink@...teo.de>

Applied, thank you.

> ---
>  drivers/input/touchscreen/sur40.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c
> index 4c0eeca..128e5bd 100644
> --- a/drivers/input/touchscreen/sur40.c
> +++ b/drivers/input/touchscreen/sur40.c
> @@ -369,7 +369,7 @@ static void sur40_poll(struct input_polled_dev *polldev)
>  		 * packet ID will usually increase in the middle of a series
>  		 * instead of at the end.
>  		 */
> -		if (packet_id != header->packet_id)
> +		if (packet_id != le32_to_cpu(header->packet_id))
>  			dev_dbg(sur40->dev, "packet ID mismatch\n");
>  
>  		packet_blobs = result / sizeof(struct sur40_blob);
> -- 
> 2.1.4
> 

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ