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:   Thu, 6 May 2021 20:35:17 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     "Dr. David Alan Gilbert" <dgilbert@...hat.com>
Cc:     Vivek Goyal <vgoyal@...hat.com>, linux-fsdevel@...r.kernel.org,
        virtio-fs@...hat.com, miklos@...redi.hu,
        linux-kernel@...r.kernel.org, dan.carpenter@...cle.com
Subject: Re: [PATCH 1/2] virtiofs, dax: Fix smatch warning about loss of info
 during shift

On Thu, May 06, 2021 at 08:07:39PM +0100, Dr. David Alan Gilbert wrote:
> > @@ -186,7 +186,7 @@ static int fuse_setup_one_mapping(struct inode *inode, unsigned long start_idx,
> >  	struct fuse_conn_dax *fcd = fm->fc->dax;
> >  	struct fuse_inode *fi = get_fuse_inode(inode);
> >  	struct fuse_setupmapping_in inarg;
> > -	loff_t offset = start_idx << FUSE_DAX_SHIFT;
> > +	loff_t offset = (loff_t)start_idx << FUSE_DAX_SHIFT;
> 
> I've not followed the others back, but isn't it easier to change
> the start_idx parameter to be a loff_t, since the places it's called
> from are poth loff_t pos?

But an index isn't a file offset, and shouldn't be typed as such.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ