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: <202403101535.uRqo6AIt-lkp@intel.com>
Date: Sun, 10 Mar 2024 15:19:56 +0800
From: kernel test robot <lkp@...el.com>
To: Paul Cercueil <paul@...pouillou.net>,
	Jonathan Cameron <jic23@...nel.org>,
	Christian König <christian.koenig@....com>,
	Jonathan Corbet <corbet@....net>,
	Lars-Peter Clausen <lars@...afoo.de>, Vinod Koul <vkoul@...nel.org>,
	Sumit Semwal <sumit.semwal@...aro.org>
Cc: oe-kbuild-all@...ts.linux.dev, Nuno Sa <nuno.sa@...log.com>,
	Michael Hennerich <michael.hennerich@...log.com>,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	dmaengine@...r.kernel.org, linux-iio@...r.kernel.org,
	linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
	linaro-mm-sig@...ts.linaro.org,
	Paul Cercueil <paul@...pouillou.net>
Subject: Re: [PATCH v8 3/6] iio: core: Add new DMABUF interface infrastructure

Hi Paul,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on vkoul-dmaengine/next lwn/docs-next linus/master v6.8-rc7 next-20240308]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Paul-Cercueil/dmaengine-Add-API-function-dmaengine_prep_peripheral_dma_vec/20240309-010421
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link:    https://lore.kernel.org/r/20240308170046.92899-4-paul%40crapouillou.net
patch subject: [PATCH v8 3/6] iio: core: Add new DMABUF interface infrastructure
config: i386-randconfig-062-20240309 (https://download.01.org/0day-ci/archive/20240310/202403101535.uRqo6AIt-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240310/202403101535.uRqo6AIt-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403101535.uRqo6AIt-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/iio/industrialio-buffer.c:1765:40: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void const [noderef] __user *from @@     got int *user_req @@
   drivers/iio/industrialio-buffer.c:1765:40: sparse:     expected void const [noderef] __user *from
   drivers/iio/industrialio-buffer.c:1765:40: sparse:     got int *user_req
>> drivers/iio/industrialio-buffer.c:1988:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected int *user_req @@     got void [noderef] __user *_arg @@
   drivers/iio/industrialio-buffer.c:1988:53: sparse:     expected int *user_req
   drivers/iio/industrialio-buffer.c:1988:53: sparse:     got void [noderef] __user *_arg
   drivers/iio/industrialio-buffer.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
   include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false

vim +1765 drivers/iio/industrialio-buffer.c

  1755	
  1756	static int iio_buffer_detach_dmabuf(struct iio_dev_buffer_pair *ib,
  1757					    int *user_req, bool nonblock)
  1758	{
  1759		struct iio_buffer *buffer = ib->buffer;
  1760		struct iio_dev *indio_dev = ib->indio_dev;
  1761		struct iio_dmabuf_priv *priv;
  1762		struct dma_buf *dmabuf;
  1763		int dmabuf_fd, ret = -EPERM;
  1764	
> 1765		if (copy_from_user(&dmabuf_fd, user_req, sizeof(dmabuf_fd)))
  1766			return -EFAULT;
  1767	
  1768		dmabuf = dma_buf_get(dmabuf_fd);
  1769		if (IS_ERR(dmabuf))
  1770			return PTR_ERR(dmabuf);
  1771	
  1772		mutex_lock(&buffer->dmabufs_mutex);
  1773	
  1774		list_for_each_entry(priv, &buffer->dmabufs, entry) {
  1775			if (priv->attach->dev == indio_dev->dev.parent
  1776			    && priv->attach->dmabuf == dmabuf) {
  1777				list_del(&priv->entry);
  1778	
  1779				/* Unref the reference from iio_buffer_attach_dmabuf() */
  1780				iio_buffer_dmabuf_put(priv->attach);
  1781				ret = 0;
  1782				break;
  1783			}
  1784		}
  1785	
  1786		mutex_unlock(&buffer->dmabufs_mutex);
  1787		dma_buf_put(dmabuf);
  1788	
  1789		return ret;
  1790	}
  1791	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ