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:   Thu, 23 May 2019 17:42:44 +0200
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Nicholas Mc Guire <hofrat@...dl.org>
Cc:     Alessandro Zummo <a.zummo@...ertech.it>, linux-rtc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtc: ds2404: use hw endiannes variable

On 09/05/2019 04:13:55+0200, Nicholas Mc Guire wrote:
> Converting from hardware to host endiannes was done using reassignment
> to the same variable which makes sparse unhappy as it can not verify
> the endiannes handling properly. To allow sparse to verify endiannes
> handling an explicit __le32 is introduced. Note that this patch does
> not change the generated binary (x86_64 and ppc64 binary diff).
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@...dl.org>
> ---
> 
> Problem located by an experimental coccinelle script to locate
> patters that make sparse unhappy (false positives):
> 
> on little-endian x86_64 sparse complains about:
> drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32
> on big-endian ppc64 sparse complains about
> drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32
> drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32
> drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32
> drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32
> drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32
> drivers/rtc/rtc-ds2404.c:187:16: warning: cast to restricted __le32
> 
> Patch was compiletested with:
>  x86_64_defconfig + RTC_DRV_DS2404=m
>  ppc64_defconfig + RTC_DRV_DS2404=m
> 
> in both cases applying the patch has no impact on the generated binary.
> 
> Patch is against 5.1 (localversion-next is next-20190508)
> 
>  drivers/rtc/rtc-ds2404.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ