All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rob Clark <robdclark@gmail.com>, dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] dma-buf: Add ioctl to query mmap info
Date: Sat, 30 Jul 2022 05:27:52 +0800	[thread overview]
Message-ID: <202207300546.hB4U217w-lkp@intel.com> (raw)
In-Reply-To: <20220729170744.1301044-2-robdclark@gmail.com>

Hi Rob,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.19-rc8]
[cannot apply to drm-misc/drm-misc-next drm/drm-next drm-exynos/exynos-drm-next drm-intel/for-linux-next drm-tip/drm-tip next-20220728]
[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/Rob-Clark/dma-buf-map-info-support/20220730-010844
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6e2c0490769ef8a95b61304389116ccc85c53e12
config: arc-randconfig-r043-20220729 (https://download.01.org/0day-ci/archive/20220730/202207300546.hB4U217w-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/203f14a73a179d6c5fbfa4813e45fde2a9ae9860
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Rob-Clark/dma-buf-map-info-support/20220730-010844
        git checkout 203f14a73a179d6c5fbfa4813e45fde2a9ae9860
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/dma-buf/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/dma-buf/dma-buf.c: In function 'dma_buf_info':
>> drivers/dma-buf/dma-buf.c:346:26: warning: passing argument 1 of 'copy_to_user' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     346 |         if (copy_to_user(uarg, &arg, sizeof(arg)))
         |                          ^~~~
   In file included from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs.h:33,
                    from drivers/dma-buf/dma-buf.c:14:
   include/linux/uaccess.h:157:27: note: expected 'void *' but argument is of type 'const void *'
     157 | copy_to_user(void __user *to, const void *from, unsigned long n)
         |              ~~~~~~~~~~~~~^~


vim +346 drivers/dma-buf/dma-buf.c

   328	
   329	static long dma_buf_info(struct dma_buf *dmabuf, const void __user *uarg)
   330	{
   331		struct dma_buf_info arg;
   332	
   333		if (copy_from_user(&arg, uarg, sizeof(arg)))
   334			return -EFAULT;
   335	
   336		switch (arg.param) {
   337		case DMA_BUF_INFO_VM_PROT:
   338			if (!dmabuf->ops->mmap_info)
   339				return -ENOSYS;
   340			arg.value = dmabuf->ops->mmap_info(dmabuf);
   341			break;
   342		default:
   343			return -EINVAL;
   344		}
   345	
 > 346		if (copy_to_user(uarg, &arg, sizeof(arg)))
   347			return -EFAULT;
   348	
   349		return 0;
   350	}
   351	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

  reply	other threads:[~2022-07-29 21:28 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 17:07 [PATCH 0/3] dma-buf: map-info support Rob Clark
2022-07-29 17:07 ` Rob Clark
2022-07-29 17:07 ` [PATCH 1/3] dma-buf: Add ioctl to query mmap info Rob Clark
2022-07-29 17:07   ` Rob Clark
2022-07-29 21:27   ` kernel test robot [this message]
2022-07-30  2:42   ` kernel test robot
2022-07-30  6:12   ` kernel test robot
2022-07-30 23:01   ` kernel test robot
2022-08-07 16:09   ` [Linaro-mm-sig] " Christian König
2022-08-07 16:09     ` Christian König
2022-08-07 17:02     ` Rob Clark
2022-08-07 17:02       ` Rob Clark
2022-08-07 17:14       ` Christian König
2022-08-07 17:14         ` Christian König
2022-08-07 17:35         ` Rob Clark
2022-08-07 17:35           ` Rob Clark
2022-08-07 17:38           ` Christian König
2022-08-07 17:38             ` Christian König
2022-08-07 17:56             ` Rob Clark
2022-08-07 17:56               ` Rob Clark
2022-08-07 18:05               ` Christian König
2022-08-07 18:05                 ` Christian König
2022-08-07 19:10                 ` Rob Clark
2022-08-07 19:10                   ` Rob Clark
2022-08-08 11:22                   ` Christian König
2022-08-08 11:22                     ` Christian König
2022-08-08 13:26                     ` Rob Clark
2022-08-08 13:26                       ` Rob Clark
2022-08-08 14:56                       ` Christian König
2022-08-08 14:56                         ` Christian König
2022-08-08 16:29                         ` Rob Clark
2022-08-08 16:29                           ` Rob Clark
2022-08-07 20:25   ` [Freedreno] " Akhil P Oommen
2022-08-07 20:25     ` Akhil P Oommen
2022-08-08 13:04     ` Rob Clark
2022-08-08 13:04       ` Rob Clark
2022-07-29 17:07 ` [PATCH 2/3] drm/prime: Wire up mmap_info support Rob Clark
2022-07-29 17:07   ` Rob Clark
2022-07-29 17:07 ` [PATCH 3/3] drm/msm/prime: Add " Rob Clark
2022-07-29 17:07   ` Rob Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202207300546.hB4U217w-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.