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]
Message-ID: <20170706191144.GT10672@ZenIV.linux.org.uk>
Date:   Thu, 6 Jul 2017 20:11:44 +0100
From:   Al Viro <viro@...IV.linux.org.uk>
To:     Christoph Hellwig <hch@....de>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [git pull] vfs.git part 3

On Thu, Jul 06, 2017 at 06:58:37PM +0200, Christoph Hellwig wrote:
> On Thu, Jul 06, 2017 at 04:51:13PM +0100, Al Viro wrote:
> > On Thu, Jul 06, 2017 at 04:46:02PM +0100, Al Viro wrote:
> > 
> > > That - on #work.read_write, as in vfs.git at the moment...
> > 
> > ... and for COMPAT_SYSCALL you need
> > #define __SC_DELOUSE(t,v) ((__force t)(unsigned long)(v))
> > in linux/compat.h
> 
> I'm still getting warnings with both these force casts.  This is
> the current stack:

That + Linus' tree as of the end of yesterday =>
  CHECK   fs/read_write.c
fs/read_write.c:38:29: warning: incorrect type in return expression (different base types)
fs/read_write.c:38:29:    expected int
fs/read_write.c:38:29:    got restricted fmode_t
fs/read_write.c:38:29: warning: incorrect type in return expression (different base types)
fs/read_write.c:38:29:    expected int
fs/read_write.c:38:29:    got restricted fmode_t
fs/read_write.c:38:29: warning: incorrect type in return expression (different base types)
fs/read_write.c:38:29:    expected int
fs/read_write.c:38:29:    got restricted fmode_t
fs/read_write.c:38:29: warning: incorrect type in return expression (different base types)
fs/read_write.c:38:29:    expected int
fs/read_write.c:38:29:    got restricted fmode_t

All of which are from unsigned_offsets() and that's one case where bool would be better than
int.  Switching the return type to bool yields
  CHECK   fs/read_write.c
  CC      fs/read_write.o
- no warnings at all.

Which sparse version are you using and what's your .config?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ