Re: [char-misc:char-misc-next 28/28] drivers/char/mem.c:737:21: sparse: sparse: incorrect type in argument 1 (different address spaces)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Christoph,

On Mon, Sep 7, 2020 at 8:25 AM Christoph Hellwig <hch@xxxxxx> wrote:
On Sun, Sep 06, 2020 at 05:14:15AM +0800, kernel test robot wrote:
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git char-misc-next
head:   99f667352f6c938440d9043d0f66f859d6f3d50d
commit: 99f667352f6c938440d9043d0f66f859d6f3d50d [28/28] /dev/zero: also implement ->read
config: m68k-randconfig-s031-20200904 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0

Looks like m68 does not have proper __user annotations for clear_user..

M68k has, m68knommu apparently hasn't.
Same for strncpy_from_user() and strnlen_user().

reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-191-g10164920-dirty
        git checkout 99f667352f6c938440d9043d0f66f859d6f3d50d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=m68k

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

   drivers/char/mem.c:163:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got char [noderef] __user *buf @@
   drivers/char/mem.c:163:37: sparse:     expected void *to
   drivers/char/mem.c:163:37: sparse:     got char [noderef] __user *buf
drivers/char/mem.c:737:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *to @@     got char [noderef] __user * @@
   drivers/char/mem.c:737:21: sparse:     expected void *to
drivers/char/mem.c:737:21: sparse:     got char [noderef] __user *

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux