Re: [kbuild] fs/fuse/dax.c:113 fuse_setup_one_mapping() warn: should 'start_idx << 21' be a 64 bit type?

From: Vivek Goyal
Date: Tue May 11 2021 - 10:52:05 EST


On Tue, May 11, 2021 at 04:21:32PM +0200, Miklos Szeredi wrote:
> On Mon, May 3, 2021 at 3:27 PM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
> >
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 9ccce092fc64d19504fa54de4fd659e279cc92e7
> > commit: c2d0ad00d948de73c78f05d2b3e5bdfa605035cc virtiofs: implement dax read/write operations
> > config: i386-randconfig-m031-20210503 (attached as .config)
> > compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
> >
> > If you fix the issue, kindly add following tag as appropriate
> > Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> >
> > New smatch warnings:
> > fs/fuse/dax.c:113 fuse_setup_one_mapping() warn: should 'start_idx << 21' be a 64 bit type?
>
> Yes.
>
> But does it make any sense to enable virtiofs and/or dax on 32bit
> guest? We sure aren't testing it, as seen from this bug report.
>
> Vivek, what do you think?

Hi Miklos,

We sure are not testing it but looks like it is possible to compile it
on 32 bit systems.

I can't think of a good reason that why virtiofs DAX should be disabled on
32 bit systems. So I sent a patch series to fix this warning here.

https://lore.kernel.org/linux-fsdevel/20210506184304.321645-1-vgoyal@xxxxxxxxxx/

Thanks
Vivek