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>] [day] [month] [year] [list]
Date:   Sat, 20 Jun 2020 09:22:55 +0800
From:   kernel test robot <lkp@...el.com>
To:     Gerd Hoffmann <kraxel@...hat.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Steven Price <steven.price@....com>
Subject: drivers/gpu/drm/drm_gem_shmem_helper.c:540:22: error: incompatible
 types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type
 'int'

Hi Gerd,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4333a9b0b67bb4e8bcd91bdd80da80b0ec151162
commit: 0be895893607fb3447478d6e33dfb60644195a09 drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap
date:   8 months ago
config: m68k-randconfig-r016-20200619 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 0be895893607fb3447478d6e33dfb60644195a09
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

   In file included from include/linux/file.h:9,
                    from include/linux/dma-buf.h:16,
                    from drivers/gpu/drm/drm_gem_shmem_helper.c:6:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
      33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                  ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_vmap_locked':
   drivers/gpu/drm/drm_gem_shmem_helper.c:261:17: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]
     261 |         VM_MAP, pgprot_writecombine(PAGE_KERNEL));
         |                 ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_gem_shmem_helper.c:261:17: error: incompatible type for argument 4 of 'vmap'
     261 |         VM_MAP, pgprot_writecombine(PAGE_KERNEL));
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |                 |
         |                 int
   In file included from include/asm-generic/io.h:887,
                    from arch/m68k/include/asm/io.h:11,
                    from arch/m68k/include/asm/pgtable_no.h:14,
                    from arch/m68k/include/asm/pgtable.h:3,
                    from include/linux/mm.h:99,
                    from include/linux/scatterlist.h:8,
                    from include/linux/dma-buf.h:18,
                    from drivers/gpu/drm/drm_gem_shmem_helper.c:6:
   include/linux/vmalloc.h:119:14: note: expected 'pgprot_t' {aka 'struct <anonymous>'} but argument is of type 'int'
     119 | extern void *vmap(struct page **pages, unsigned int count,
         |              ^~~~
   drivers/gpu/drm/drm_gem_shmem_helper.c: In function 'drm_gem_shmem_mmap':
>> drivers/gpu/drm/drm_gem_shmem_helper.c:540:22: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
     540 |  vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
         |                      ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +540 drivers/gpu/drm/drm_gem_shmem_helper.c

   513	
   514	/**
   515	 * drm_gem_shmem_mmap - Memory-map a shmem GEM object
   516	 * @obj: gem object
   517	 * @vma: VMA for the area to be mapped
   518	 *
   519	 * This function implements an augmented version of the GEM DRM file mmap
   520	 * operation for shmem objects. Drivers which employ the shmem helpers should
   521	 * use this function as their &drm_gem_object_funcs.mmap handler.
   522	 *
   523	 * Returns:
   524	 * 0 on success or a negative error code on failure.
   525	 */
   526	int drm_gem_shmem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma)
   527	{
   528		struct drm_gem_shmem_object *shmem;
   529		int ret;
   530	
   531		shmem = to_drm_gem_shmem_obj(obj);
   532	
   533		ret = drm_gem_shmem_get_pages(shmem);
   534		if (ret) {
   535			drm_gem_vm_close(vma);
   536			return ret;
   537		}
   538	
   539		vma->vm_flags |= VM_IO | VM_MIXEDMAP | VM_DONTEXPAND | VM_DONTDUMP;
 > 540		vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags));
   541		vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
   542		vma->vm_ops = &drm_gem_shmem_vm_ops;
   543	
   544		/* Remove the fake offset */
   545		vma->vm_pgoff -= drm_vma_node_start(&shmem->base.vma_node);
   546	
   547		return 0;
   548	}
   549	EXPORT_SYMBOL_GPL(drm_gem_shmem_mmap);
   550	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (21620 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ