tree: git://git.infradead.org/users/hch/misc.git quota-compat head: 7869dc95f0b4f7deb84d8d9ef6e216e48ef1d08d commit: 7869dc95f0b4f7deb84d8d9ef6e216e48ef1d08d [4/4] quota: simplify the quotactl compat handling config: sh-randconfig-s031-20200724 (attached as .config) compiler: sh4-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.2-93-g4c6cbe55-dirty git checkout 7869dc95f0b4f7deb84d8d9ef6e216e48ef1d08d # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=sh If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> fs/quota/quota.c:295:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] __user * @@ >> fs/quota/quota.c:295:21: sparse: expected unsigned int const *__gu_addr >> fs/quota/quota.c:295:21: sparse: got unsigned int [noderef] __user * >> fs/quota/quota.c:295:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user * @@ got unsigned int const *__gu_addr @@ >> fs/quota/quota.c:295:21: sparse: expected void const volatile [noderef] __user * >> fs/quota/quota.c:295:21: sparse: got unsigned int const *__gu_addr vim +295 fs/quota/quota.c 283 284 static int quota_setquota(struct super_block *sb, int type, qid_t id, 285 void __user *addr) 286 { 287 struct qc_dqblk fdq; 288 struct if_dqblk idq; 289 struct kqid qid; 290 291 if (compat_need_64bit_alignment_fixup()) { 292 struct compat_if_dqblk __user *compat_dqblk = addr; 293 294 if (copy_from_user(&idq, compat_dqblk, sizeof(*compat_dqblk)) || > 295 get_user(idq.dqb_valid, &compat_dqblk->dqb_valid)) 296 return -EFAULT; 297 } else { 298 if (copy_from_user(&idq, addr, sizeof(idq))) 299 return -EFAULT; 300 } 301 if (!sb->s_qcop->set_dqblk) 302 return -ENOSYS; 303 qid = make_kqid(current_user_ns(), type, id); 304 if (!qid_has_mapping(sb->s_user_ns, qid)) 305 return -EINVAL; 306 copy_from_if_dqblk(&fdq, &idq); 307 return sb->s_qcop->set_dqblk(sb, qid, &fdq); 308 } 309 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org