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: <201904302331.zaHkGaBL%lkp@intel.com>
Date:   Tue, 30 Apr 2019 23:23:56 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Christian König 
        <ckoenig.leichtzumerken@...il.com>
Cc:     kbuild-all@...org, xen-devel@...ts.xenproject.org,
        devel@...verdev.osuosl.org, linux-tegra@...r.kernel.org,
        intel-gfx@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, linux-media@...r.kernel.org,
        sstabellini@...nel.org, jgross@...e.com,
        boris.ostrovsky@...cle.com, digetx@...il.com,
        gregkh@...uxfoundation.org, arnd@...db.de, mchehab@...nel.org,
        kyungmin.park@...sung.com, m.szyprowski@...sung.com,
        pawel@...iak.com, jonathanh@...dia.com, thierry.reding@...il.com,
        tomi.valkeinen@...com, rodrigo.vivi@...el.com,
        joonas.lahtinen@...ux.intel.com, jani.nikula@...ux.intel.com,
        sean@...rly.run, maxime.ripard@...tlin.com,
        maarten.lankhorst@...ux.intel.com, linux@...linux.org.uk,
        sumit.semwal@...aro.org
Subject: Re: [Intel-gfx] [PATCH] dma-buf: add struct dma_buf_attach_info v2

Hi "Christian,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.1-rc7 next-20190429]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Christian-K-nig/dma-buf-add-struct-dma_buf_attach_info-v2/20190430-221017
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.1.0 make.cross ARCH=xtensa 

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

All errors (new ones prefixed by >>):

   drivers/staging/media/tegra-vde/tegra-vde.c: In function 'tegra_vde_attach_dmabuf':
>> drivers/staging/media/tegra-vde/tegra-vde.c:573:13: error: 'dmabuf' undeclared (first use in this function); did you mean 'dma_buf'?
      .dmabuf = dmabuf
                ^~~~~~
                dma_buf
   drivers/staging/media/tegra-vde/tegra-vde.c:573:13: note: each undeclared identifier is reported only once for each function it appears in

vim +573 drivers/staging/media/tegra-vde/tegra-vde.c

   559	
   560	static int tegra_vde_attach_dmabuf(struct device *dev,
   561					   int fd,
   562					   unsigned long offset,
   563					   size_t min_size,
   564					   size_t align_size,
   565					   struct dma_buf_attachment **a,
   566					   dma_addr_t *addr,
   567					   struct sg_table **s,
   568					   size_t *size,
   569					   enum dma_data_direction dma_dir)
   570	{
   571		struct dma_buf_attach_info attach_info = {
   572			.dev = dev,
 > 573			.dmabuf = dmabuf
   574		};
   575		struct dma_buf_attachment *attachment;
   576		struct dma_buf *dmabuf;
   577		struct sg_table *sgt;
   578		int err;
   579	
   580		dmabuf = dma_buf_get(fd);
   581		if (IS_ERR(dmabuf)) {
   582			dev_err(dev, "Invalid dmabuf FD\n");
   583			return PTR_ERR(dmabuf);
   584		}
   585	
   586		if (dmabuf->size & (align_size - 1)) {
   587			dev_err(dev, "Unaligned dmabuf 0x%zX, should be aligned to 0x%zX\n",
   588				dmabuf->size, align_size);
   589			return -EINVAL;
   590		}
   591	
   592		if ((u64)offset + min_size > dmabuf->size) {
   593			dev_err(dev, "Too small dmabuf size %zu @0x%lX, should be at least %zu\n",
   594				dmabuf->size, offset, min_size);
   595			return -EINVAL;
   596		}
   597	
   598		attachment = dma_buf_attach(&attach_info);
   599		if (IS_ERR(attachment)) {
   600			dev_err(dev, "Failed to attach dmabuf\n");
   601			err = PTR_ERR(attachment);
   602			goto err_put;
   603		}
   604	
   605		sgt = dma_buf_map_attachment(attachment, dma_dir);
   606		if (IS_ERR(sgt)) {
   607			dev_err(dev, "Failed to get dmabufs sg_table\n");
   608			err = PTR_ERR(sgt);
   609			goto err_detach;
   610		}
   611	
   612		if (sgt->nents != 1) {
   613			dev_err(dev, "Sparse DMA region is unsupported\n");
   614			err = -EINVAL;
   615			goto err_unmap;
   616		}
   617	
   618		*addr = sg_dma_address(sgt->sgl) + offset;
   619		*a = attachment;
   620		*s = sgt;
   621	
   622		if (size)
   623			*size = dmabuf->size - offset;
   624	
   625		return 0;
   626	
   627	err_unmap:
   628		dma_buf_unmap_attachment(attachment, sgt, dma_dir);
   629	err_detach:
   630		dma_buf_detach(dmabuf, attachment);
   631	err_put:
   632		dma_buf_put(dmabuf);
   633	
   634		return err;
   635	}
   636	

---
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/gzip" (56166 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ