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]
Message-ID: <201603190120.DoZP6EFw%fengguang.wu@intel.com>
Date:	Sat, 19 Mar 2016 01:43:12 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Joe Perches <joe@...ches.com>
Cc:	kbuild-all@...org, Gustavo Padovan <gustavo@...ovan.org>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Thierry Reding <thierry.reding@...il.com>,
	Terje Bergström <tbergstrom@...dia.com>,
	Stephen Warren <swarren@...dotorg.org>,
	Alexandre Courbot <gnurou@...il.com>,
	David Airlie <airlied@...ux.ie>,
	Gerd Hoffmann <kraxel@...hat.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Daniel Vetter <daniel.vetter@...el.com>,
	Rob Clark <robdclark@...il.com>,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	linux-tegra@...r.kernel.org,
	virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH] gpu/drm: Use u64_to_user_pointer

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@...cle.com>
:::::: CC: Eric Anholt <eric@...olt.net>

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

Download attachment ".config.gz" of type "application/octet-stream" (43845 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ