Re: [PATCH] gpu/drm: Use u64_to_user_pointer

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

 



Hi Joe,

[auto build test ERROR on drm/drm-next]
[also build test ERROR on next-20160318]
[cannot apply to v4.5]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/Joe-Perches/gpu-drm-Use-u64_to_user_pointer/20160319-012749
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: xtensa-allmodconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

All error/warnings (new ones prefixed by >>):

   drivers/gpu/drm/vc4/vc4_bo.c: In function 'vc4_create_shader_bo_ioctl':
>> drivers/gpu/drm/vc4/vc4_bo.c:502:2: error: implicit declaration of function 'u64_to_user_ptr' [-Werror=implicit-function-declaration]
     if (copy_from_user(bo->base.vaddr,
     ^
   In file included from include/linux/uaccess.h:5:0,
                    from include/linux/highmem.h:8,
                    from include/drm/drmP.h:40,
                    from drivers/gpu/drm/vc4/vc4_drv.h:9,
                    from drivers/gpu/drm/vc4/vc4_bo.c:21:
>> arch/xtensa/include/asm/uaccess.h:429:37: warning: passing argument 2 of '__generic_copy_from_user' makes pointer from integer without a cast
    #define copy_from_user(to, from, n) __generic_copy_from_user((to), (from), (n))
                                        ^
>> drivers/gpu/drm/vc4/vc4_bo.c:502:6: note: in expansion of macro 'copy_from_user'
     if (copy_from_user(bo->base.vaddr,
         ^
   arch/xtensa/include/asm/uaccess.h:418:1: note: expected 'const void *' but argument is of type 'int'
    __generic_copy_from_user(void *to, const void *from, unsigned long n)
    ^
   cc1: some warnings being treated as errors
--
   drivers/gpu/drm/vc4/vc4_gem.c: In function 'vc4_get_hang_state_ioctl':
>> drivers/gpu/drm/vc4/vc4_gem.c:123:2: error: implicit declaration of function 'u64_to_user_ptr' [-Werror=implicit-function-declaration]
     if (copy_to_user(u64_to_user_ptr(get_state->bo),
     ^
   In file included from include/linux/uaccess.h:5:0,
                    from include/linux/highmem.h:8,
                    from include/drm/drmP.h:40,
                    from drivers/gpu/drm/vc4/vc4_drv.h:9,
                    from drivers/gpu/drm/vc4/vc4_gem.c:31:
>> arch/xtensa/include/asm/uaccess.h:428:35: warning: passing argument 1 of '__generic_copy_to_user' makes pointer from integer without a cast
    #define copy_to_user(to, from, n) __generic_copy_to_user((to), (from), (n))
                                      ^
>> drivers/gpu/drm/vc4/vc4_gem.c:123:6: note: in expansion of macro 'copy_to_user'
     if (copy_to_user(u64_to_user_ptr(get_state->bo),
         ^
   arch/xtensa/include/asm/uaccess.h:409:1: note: expected 'void *' but argument is of type 'int'
    __generic_copy_to_user(void *to, const void *from, unsigned long n)
    ^
   drivers/gpu/drm/vc4/vc4_gem.c: In function 'vc4_cl_lookup_bos':
>> arch/xtensa/include/asm/uaccess.h:429:37: warning: passing argument 2 of '__generic_copy_from_user' makes pointer from integer without a cast
    #define copy_from_user(to, from, n) __generic_copy_from_user((to), (from), (n))
                                        ^
>> drivers/gpu/drm/vc4/vc4_gem.c:552:8: note: in expansion of macro 'copy_from_user'
     ret = copy_from_user(handles,
           ^
   arch/xtensa/include/asm/uaccess.h:418:1: note: expected 'const void *' but argument is of type 'int'
    __generic_copy_from_user(void *to, const void *from, unsigned long n)
    ^
   drivers/gpu/drm/vc4/vc4_gem.c: In function 'vc4_get_bcl':
>> arch/xtensa/include/asm/uaccess.h:429:37: warning: passing argument 2 of '__generic_copy_from_user' makes pointer from integer without a cast
    #define copy_from_user(to, from, n) __generic_copy_from_user((to), (from), (n))
                                        ^
   drivers/gpu/drm/vc4/vc4_gem.c:626:6: note: in expansion of macro 'copy_from_user'
     if (copy_from_user(bin,
         ^
   arch/xtensa/include/asm/uaccess.h:418:1: note: expected 'const void *' but argument is of type 'int'
    __generic_copy_from_user(void *to, const void *from, unsigned long n)
    ^
>> arch/xtensa/include/asm/uaccess.h:429:37: warning: passing argument 2 of '__generic_copy_from_user' makes pointer from integer without a cast
    #define copy_from_user(to, from, n) __generic_copy_from_user((to), (from), (n))
                                        ^
   drivers/gpu/drm/vc4/vc4_gem.c:633:6: note: in expansion of macro 'copy_from_user'
     if (copy_from_user(exec->shader_rec_u,
         ^
   arch/xtensa/include/asm/uaccess.h:418:1: note: expected 'const void *' but argument is of type 'int'
    __generic_copy_from_user(void *to, const void *from, unsigned long n)
    ^
>> arch/xtensa/include/asm/uaccess.h:429:37: warning: passing argument 2 of '__generic_copy_from_user' makes pointer from integer without a cast
    #define copy_from_user(to, from, n) __generic_copy_from_user((to), (from), (n))
                                        ^
   drivers/gpu/drm/vc4/vc4_gem.c:640:6: note: in expansion of macro 'copy_from_user'
     if (copy_from_user(exec->uniforms_u,
         ^
   arch/xtensa/include/asm/uaccess.h:418:1: note: expected 'const void *' but argument is of type 'int'
    __generic_copy_from_user(void *to, const void *from, unsigned long n)
    ^
   cc1: some warnings being treated as errors
--
   drivers/gpu/drm/virtio/virtgpu_ioctl.c: In function 'virtio_gpu_execbuffer':
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:126:3: error: implicit declaration of function 'u64_to_user_ptr' [-Werror=implicit-function-declaration]
      user_bo_handles = u64_to_user_ptr(exbuf->bo_handles);
      ^
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:126:19: warning: assignment makes pointer from integer without a cast
      user_bo_handles = u64_to_user_ptr(exbuf->bo_handles);
                      ^
   In file included from include/linux/uaccess.h:5:0,
                    from include/linux/highmem.h:8,
                    from include/drm/drmP.h:40,
                    from drivers/gpu/drm/virtio/virtgpu_ioctl.c:28:
>> arch/xtensa/include/asm/uaccess.h:429:37: warning: passing argument 2 of '__generic_copy_from_user' makes pointer from integer without a cast
    #define copy_from_user(to, from, n) __generic_copy_from_user((to), (from), (n))
                                        ^
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:161:6: note: in expansion of macro 'copy_from_user'
     if (copy_from_user(buf, u64_to_user_ptr(exbuf->command), exbuf->size)) {
         ^
   arch/xtensa/include/asm/uaccess.h:418:1: note: expected 'const void *' but argument is of type 'int'
    __generic_copy_from_user(void *to, const void *from, unsigned long n)
    ^
   cc1: some warnings being treated as errors

vim +/u64_to_user_ptr +502 drivers/gpu/drm/vc4/vc4_bo.c

463873d5 Eric Anholt   2015-11-30  496  	}
463873d5 Eric Anholt   2015-11-30  497  
463873d5 Eric Anholt   2015-11-30  498  	bo = vc4_bo_create(dev, args->size, true);
2c68f1fc Eric Anholt   2016-01-25  499  	if (IS_ERR(bo))
2c68f1fc Eric Anholt   2016-01-25  500  		return PTR_ERR(bo);
463873d5 Eric Anholt   2015-11-30  501  
585cb132 Dan Carpenter 2016-03-08 @502  	if (copy_from_user(bo->base.vaddr,
3f3044e5 Joe Perches   2016-03-18  503  			   u64_to_user_ptr(args->data),
585cb132 Dan Carpenter 2016-03-08  504  			   args->size)) {
585cb132 Dan Carpenter 2016-03-08  505  		ret = -EFAULT;

:::::: The code at line 502 was first introduced by commit
:::::: 585cb132a48190b554aecda2ebc3e2911fcbb665 drm/vc4: Return -EFAULT on copy_from_user() failure

:::::: TO: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
:::::: CC: Eric Anholt <eric@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux