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]
Message-ID: <20200807150526.vkbkslhiyy7gb6dc@ltop.local>
Date:   Fri, 7 Aug 2020 17:05:26 +0200
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     Gao Xiang <hsiangkao@....com>
Cc:     kernel test robot <lkp@...el.com>, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: fs/erofs/zdata.c:198:22: sparse: sparse: non size-preserving
 integer to pointer cast

On Fri, Aug 07, 2020 at 10:48:12PM +0800, Gao Xiang wrote:
> On Fri, Aug 07, 2020 at 08:08:10PM +0800, kernel test robot wrote:
> > sparse warnings: (new ones prefixed by >>)
> > 
> > >> fs/erofs/zdata.c:198:22: sparse: sparse: non size-preserving integer to pointer cast
> >    fs/erofs/zdata.c:282:22: sparse: sparse: non size-preserving integer to pointer cast
> >    fs/erofs/zdata.c:1094:24: sparse: sparse: non size-preserving integer to pointer cast
> 
> I don't think these are valid warnings.

Indeed, they're not.
 
> All these three lines are using cmpxchg struct page * (which is equivalent to unsigned long
> in these cmpxchg macros) and nothing special at all in my opinion (Especially the last two
> lines).

What is special is that s390 use __sync_val_compare_and_swap() to implement
cmpxchg(). This builtin has a return type which depends on its arguments
while sparse was always using 'int' as the return type.

A patch is on the way.

Regards,
-- Luc Van Oostenryck

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ