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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 7 Jul 2020 00:55:25 +0800
From:   kernel test robot <lkp@...el.com>
To:     Marek Szyprowski <m.szyprowski@...sung.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Inki Dae <inki.dae@...sung.com>
Subject: drivers/gpu/drm/exynos/exynos_drm_gem.c:62:36: sparse: sparse:
 incorrect type in assignment (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dcb7fd82c75ee2d6e6f9d8cc71c52519ed52e258
commit: 9940d9d93406f41ad4dc69fa2cda1e059a7ca108 drm/exynos: gem: Get rid of the internal 'pages' array
date:   7 weeks ago
config: arm64-randconfig-s032-20200706 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
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-14-g8fce3d7a-dirty
        git checkout 9940d9d93406f41ad4dc69fa2cda1e059a7ca108
        # 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=arm64 

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


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/exynos/exynos_drm_gem.c:62:36: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] <asn:2> *kvaddr @@     got void *cookie @@
>> drivers/gpu/drm/exynos/exynos_drm_gem.c:62:36: sparse:     expected void [noderef] <asn:2> *kvaddr
>> drivers/gpu/drm/exynos/exynos_drm_gem.c:62:36: sparse:     got void *cookie

vim +62 drivers/gpu/drm/exynos/exynos_drm_gem.c

    19	
    20	static int exynos_drm_alloc_buf(struct exynos_drm_gem *exynos_gem, bool kvmap)
    21	{
    22		struct drm_device *dev = exynos_gem->base.dev;
    23		unsigned long attr = 0;
    24	
    25		if (exynos_gem->dma_addr) {
    26			DRM_DEV_DEBUG_KMS(to_dma_dev(dev), "already allocated.\n");
    27			return 0;
    28		}
    29	
    30		/*
    31		 * if EXYNOS_BO_CONTIG, fully physically contiguous memory
    32		 * region will be allocated else physically contiguous
    33		 * as possible.
    34		 */
    35		if (!(exynos_gem->flags & EXYNOS_BO_NONCONTIG))
    36			attr |= DMA_ATTR_FORCE_CONTIGUOUS;
    37	
    38		/*
    39		 * if EXYNOS_BO_WC or EXYNOS_BO_NONCACHABLE, writecombine mapping
    40		 * else cachable mapping.
    41		 */
    42		if (exynos_gem->flags & EXYNOS_BO_WC ||
    43				!(exynos_gem->flags & EXYNOS_BO_CACHABLE))
    44			attr |= DMA_ATTR_WRITE_COMBINE;
    45		else
    46			attr |= DMA_ATTR_NON_CONSISTENT;
    47	
    48		/* FBDev emulation requires kernel mapping */
    49		if (!kvmap)
    50			attr |= DMA_ATTR_NO_KERNEL_MAPPING;
    51	
    52		exynos_gem->dma_attrs = attr;
    53		exynos_gem->cookie = dma_alloc_attrs(to_dma_dev(dev), exynos_gem->size,
    54						     &exynos_gem->dma_addr, GFP_KERNEL,
    55						     exynos_gem->dma_attrs);
    56		if (!exynos_gem->cookie) {
    57			DRM_DEV_ERROR(to_dma_dev(dev), "failed to allocate buffer.\n");
    58			return -ENOMEM;
    59		}
    60	
    61		if (kvmap)
  > 62			exynos_gem->kvaddr = exynos_gem->cookie;
    63	
    64		DRM_DEV_DEBUG_KMS(to_dma_dev(dev), "dma_addr(0x%lx), size(0x%lx)\n",
    65				(unsigned long)exynos_gem->dma_addr, exynos_gem->size);
    66		return 0;
    67	}
    68	

---
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" (37494 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ