tree:
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git simple_copy
head: d6f32b90156624ae9dc06ef5873334a48e9b9806
commit: fcbd83ffa72af1eba12bcab1f34e0b956a563e02 [2/5] block: add simple copy support
config: xtensa-randconfig-r004-20210209 (attached as .config)
compiler: xtensa-linux-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://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/commit/?id...
git remote add chao-linux
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git
git fetch --no-tags chao-linux simple_copy
git checkout fcbd83ffa72af1eba12bcab1f34e0b956a563e02
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
block/ioctl.c: In function 'blk_ioctl_copy':
> block/ioctl.c:164:28: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
164 | if (copy_from_user(rlist, (void
__user *)crange.range_list,
| ^
vim +164 block/ioctl.c
135
136 static int blk_ioctl_copy(struct block_device *bdev, fmode_t mode,
137 unsigned long arg)
138 {
139 struct copy_range crange;
140 struct range_entry *rlist;
141 struct request_queue *q = bdev_get_queue(bdev);
142 sector_t dest;
143 int ret;
144
145 if (!(mode & FMODE_WRITE))
146 return -EBADF;
147
148 if (!blk_queue_copy(q))
149 return -EOPNOTSUPP;
150
151 if (copy_from_user(&crange, (void __user *)arg, sizeof(crange)))
152 return -EFAULT;
153
154 if (crange.dest & ((1 << SECTOR_SHIFT) - 1))
155 return -EFAULT;
156 dest = crange.dest;
157
158 rlist = kmalloc_array(crange.nr_range, sizeof(*rlist),
159 GFP_KERNEL);
160
161 if (!rlist)
162 return -ENOMEM;
163
164 if (copy_from_user(rlist, (void __user *)crange.range_list,
165 sizeof(*rlist) * crange.nr_range)) {
166 ret = -EFAULT;
167 goto out;
168 }
169
170 ret = blkdev_issue_copy(bdev, crange.nr_range, rlist, bdev, dest,
171 GFP_KERNEL);
172 out:
173 kfree(rlist);
174 return ret;
175 }
176
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org