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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 26 Nov 2020 19:28:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     Iskren Chernev <iskren.chernev@...il.com>,
        Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>
Cc:     kbuild-all@...ts.01.org, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, linux-arm-msm@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org,
        ~postmarketos/upstreaming@...ts.sr.ht,
        Iskren Chernev <iskren.chernev@...il.com>
Subject: Re: [PATCH] drm/msm: Fix use-after-free in msm_gem with carveout

Hi Iskren,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20201125]
[also build test ERROR on 6147c83fd749d19a0d3ccc2f64d12138ab010b47]
[cannot apply to drm-intel/for-linux-next drm-tip/drm-tip linus/master robclark/msm-next v5.10-rc5 v5.10-rc4 v5.10-rc3 v5.10-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Iskren-Chernev/drm-msm-Fix-use-after-free-in-msm_gem-with-carveout/20201126-163426
base:    9d3e48f20e1159a7bb2ff5de96594b6375157fe0
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
        # https://github.com/0day-ci/linux/commit/b08a39143f118f378b9fbb9ccfa03999dc419b1c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Iskren-Chernev/drm-msm-Fix-use-after-free-in-msm_gem-with-carveout/20201126-163426
        git checkout b08a39143f118f378b9fbb9ccfa03999dc419b1c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

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 arch/arm/include/asm/bug.h:60,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from include/linux/dma-map-ops.h:9,
                    from drivers/gpu/drm/msm/msm_gem.c:7:
   drivers/gpu/drm/msm/msm_gem.c: In function 'put_iova_vmas':
>> drivers/gpu/drm/msm/msm_gem.c:380:35: error: 'struct msm_gem_object' has no member named 'lock'
     380 |  WARN_ON(!mutex_is_locked(&msm_obj->lock));
         |                                   ^~
   include/asm-generic/bug.h:119:25: note: in definition of macro 'WARN_ON'
     119 |  int __ret_warn_on = !!(condition);    \
         |                         ^~~~~~~~~
   drivers/gpu/drm/msm/msm_gem.c: In function 'msm_gem_free_object':
>> drivers/gpu/drm/msm/msm_gem.c:983:2: error: implicit declaration of function 'put_iova_vma'; did you mean 'put_iova_vmas'? [-Werror=implicit-function-declaration]
     983 |  put_iova_vma(obj);
         |  ^~~~~~~~~~~~
         |  put_iova_vmas
   cc1: some warnings being treated as errors

vim +380 drivers/gpu/drm/msm/msm_gem.c

   372	
   373	/* Called with msm_obj locked */
   374	static void
   375	put_iova_vmas(struct drm_gem_object *obj)
   376	{
   377		struct msm_gem_object *msm_obj = to_msm_bo(obj);
   378		struct msm_gem_vma *vma, *tmp;
   379	
 > 380		WARN_ON(!mutex_is_locked(&msm_obj->lock));
   381	
   382		list_for_each_entry_safe(vma, tmp, &msm_obj->vmas, list) {
   383			del_vma(vma);
   384		}
   385	}
   386	

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

Powered by blists - more mailing lists