On Fri, May 22, 2020 at 03:44:40PM +0100, Catalin Marinas wrote: > On Fri, May 22, 2020 at 03:23:21PM +0100, Al Viro wrote: > > On Fri, May 22, 2020 at 09:58:00PM +0800, kbuild test robot wrote: > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git uaccess.net > > > head: 0edecc020b33f8e31d8baa80735b45e8e8434700 > > > commit: a3929484af75ee524419edbbc4e9ce012c3d67c9 [16/19] atm: move copyin from atm_getnames() into the caller > > > config: arm64-randconfig-s002-20200521 (attached as .config) > > > compiler: aarch64-linux-gcc (GCC) 9.3.0 > > > reproduce: > > > # apt-get install sparse > > > # sparse version: v0.6.1-193-gb8fad4bc-dirty > > > git checkout a3929484af75ee524419edbbc4e9ce012c3d67c9 > > > # save the attached .config to linux build tree > > > make W=1 C=1 ARCH=arm64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' > > > > > > If you fix the issue, kindly add following tag as appropriate > > > Reported-by: kbuild test robot <lkp@xxxxxxxxx> > > > > > > > > > sparse warnings: (new ones prefixed by >>) > > > > > > >> net/atm/ioctl.c:180:29: sparse: sparse: Using plain integer as NULL pointer > > > > Huh? > > > > > > 180 if (get_user(buf, &iobuf->buffer)) > > > > _what_ use of plain integer as a NULL pointer? <looks> > > Misannotated get_user() on arm64 - should be > > diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h > > index 32fc8061aa76..bc5c7b091152 100644 > > --- a/arch/arm64/include/asm/uaccess.h > > +++ b/arch/arm64/include/asm/uaccess.h > > @@ -304,7 +304,7 @@ do { \ > > __p = uaccess_mask_ptr(__p); \ > > __raw_get_user((x), __p, (err)); \ > > } else { \ > > - (x) = 0; (err) = -EFAULT; \ > > + (x) = (__force __typeof__(x))0; (err) = -EFAULT; \ > > } \ > > } while (0) > > > > and that's a _lot_ of noise in sparse logs on arm64, obviously - one for > > each get_user() of a pointer... > > Thanks for pointing this out. We seem to do the right thing for > __raw_get_user() but missed one path in __get_user_error(). > > Since you wrote the patch already, are you ok for me to add some text > and your signed-off-by? Sure, np...