From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8273575549634787713==" MIME-Version: 1.0 From: Chen, Rong A To: kbuild-all@lists.01.org Subject: Re: [RFC PATCH 3/3] ovl: implement stacked mmap for shared map Date: Sun, 30 Aug 2020 15:10:03 +0800 Message-ID: <401f96d7-2c7e-835c-98ae-343cfd228b86@intel.com> In-Reply-To: <4ac1b013-6193-da70-3384-d8878a247fbc@mykernel.net> List-Id: --===============8273575549634787713== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 8/29/2020 8:28 PM, cgxu wrote: > On 8/29/20 7:35 PM, kernel test robot wrote: >> Hi Chengguang, >> >> [FYI, it's a private test report for your RFC patch.] >> [auto build test ERROR on miklos-vfs/overlayfs-next] >> [also build test ERROR on v5.9-rc2 next-20200828] >> [cannot apply to hnaz-linux-mm/master] >> [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] >> >> url: = >> https://github.com/0day-ci/linux/commits/Chengguang-Xu/ovl-stacked-mmap-= for-shared-map/20200829-175321 >> base: = >> https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git = >> overlayfs-next >> config: sh-allmodconfig (attached as .config) >> compiler: sh4-linux-gcc (GCC) 9.3.0 >> reproduce (this is a W=3D1 build): >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 wget = >> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross = >> -O ~/bin/make.cross >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 chmod +x ~/bin/make.cro= ss >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # save the attached .co= nfig to linux build tree >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 COMPILER_INSTALL_PATH= =3D$HOME/0day COMPILER=3Dgcc-9.3.0 = >> make.cross ARCH=3Dsh >> >> If you fix the issue, kindly add following tag as appropriate >> Reported-by: kernel test robot > > It seems missed applying two previous patches in the patch set, = > actually, the patch set is based on miklos-vfs/overlayfs-next. Hi Chengguang, Thanks for the feedback, we'll take a look. Best Regards, Rong Chen > > cgxu > >> >> All error/warnings (new ones prefixed by >>): >> >> =C2=A0=C2=A0=C2=A0 fs/overlayfs/file.c:37:14: warning: no previous proto= type for = >> 'ovl_get_realfile' [-Wmissing-prototypes] >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 37 | struct file *ovl_get_realfile(= struct file *file) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~~~~~~~~= ~~~~~ >> =C2=A0=C2=A0=C2=A0 fs/overlayfs/file.c:44:6: warning: no previous protot= ype for = >> 'ovl_set_realfile' [-Wmissing-prototypes] >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 44 | void ovl_set_realfile(struct f= ile *file, struct file = >> *realfile) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 ^~~~~~~~~~~~~~~~ >> =C2=A0=C2=A0=C2=A0 fs/overlayfs/file.c:51:36: warning: no previous proto= type for = >> 'ovl_get_real_vmops' [-Wmissing-prototypes] >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 51 | const struct vm_operations_str= uct = >> *ovl_get_real_vmops(struct file *file) >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | ^~~~~~~~~~~~~~~= ~~~ >> =C2=A0=C2=A0=C2=A0 fs/overlayfs/file.c:58:6: warning: no previous protot= ype for = >> 'ovl_set_real_vmops' [-Wmissing-prototypes] >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 58 | void ovl_set_real_vmops(struct= file *file, >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 ^~~~~~~~~~~~~~~~~~ >> =C2=A0=C2=A0=C2=A0 fs/overlayfs/file.c: In function 'ovl_fault': >>>> fs/overlayfs/file.c:518:6: error: implicit declaration of function = >>>> 'fault_flag_check' [-Werror=3Dimplicit-function-declaration] >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 518 |=C2=A0 if (fault_flag_check(vmf, FAU= LT_FLAG_TRIED)) { >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 ^~~~~~~~~~~~~~~~ >>>> fs/overlayfs/file.c:551:10: error: implicit declaration of function = >>>> 'maybe_unlock_mmap_for_io' [-Werror=3Dimplicit-function-declaration] >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 551 |=C2=A0=C2=A0 fpin =3D maybe_unlock_m= map_for_io(vmf, NULL); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^~~~~~~~~~~~~~~~~~~~~~~~ >>>> fs/overlayfs/file.c:551:8: warning: assignment to 'struct file *' = >>>> from 'int' makes pointer from integer without a cast = >>>> [-Wint-conversion] >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 551 |=C2=A0=C2=A0 fpin =3D maybe_unlock_m= map_for_io(vmf, NULL); >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 ^ >> =C2=A0=C2=A0=C2=A0 cc1: some warnings being treated as errors >> >> # = >> https://github.com/0day-ci/linux/commit/a33b1899ccf797aa55f56333a2700cfb= c67487cc >> git remote add linux-review https://github.com/0day-ci/linux >> git fetch --no-tags linux-review = >> Chengguang-Xu/ovl-stacked-mmap-for-shared-map/20200829-175321 >> git checkout a33b1899ccf797aa55f56333a2700cfbc67487cc >> vim +/fault_flag_check +518 fs/overlayfs/file.c >> >> =C2=A0=C2=A0=C2=A0 504 >> =C2=A0=C2=A0=C2=A0 505=C2=A0=C2=A0=C2=A0 vm_fault_t ovl_fault(struct vm_= fault *vmf) >> =C2=A0=C2=A0=C2=A0 506=C2=A0=C2=A0=C2=A0 { >> =C2=A0=C2=A0=C2=A0 507=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct = vm_area_struct *vma =3D vmf->vma; >> =C2=A0=C2=A0=C2=A0 508=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct = file *file =3D vma->vm_file; >> =C2=A0=C2=A0=C2=A0 509=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct = file *realfile; >> =C2=A0=C2=A0=C2=A0 510=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct = file *fpin, *tmp; >> =C2=A0=C2=A0=C2=A0 511=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct = inode *inode =3D file_inode(file); >> =C2=A0=C2=A0=C2=A0 512=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 struct = inode *realinode; >> =C2=A0=C2=A0=C2=A0 513=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 const s= truct cred *old_cred; >> =C2=A0=C2=A0=C2=A0 514=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 bool re= try_allowed; >> =C2=A0=C2=A0=C2=A0 515=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 vm_faul= t_t ret; >> =C2=A0=C2=A0=C2=A0 516=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 int err= =3D 0; >> =C2=A0=C2=A0=C2=A0 517 >> =C2=A0 > 518=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (fault_flag_ch= eck(vmf, FAULT_FLAG_TRIED)) { >> =C2=A0=C2=A0=C2=A0 519=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 realfile =3D ovl_get_realfile(file); >> =C2=A0=C2=A0=C2=A0 520 >> =C2=A0=C2=A0=C2=A0 521=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if (!ovl_has_upperdata(inode) || >> =C2=A0=C2=A0=C2=A0 522=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 realfile->f_inode !=3D ovl_inode= _upper(inode) || >> =C2=A0=C2=A0=C2=A0 523=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 !realfile->f_op->mmap) >> =C2=A0=C2=A0=C2=A0 524=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return VM_FAULT_SIGBUS; >> =C2=A0=C2=A0=C2=A0 525 >> =C2=A0=C2=A0=C2=A0 526=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if (!ovl_get_real_vmops(file)) { >> =C2=A0=C2=A0=C2=A0 527=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 old_cred =3D ovl_override_creds(= inode->i_sb); >> =C2=A0=C2=A0=C2=A0 528=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 err =3D call_mmap(realfile, vma); >> =C2=A0=C2=A0=C2=A0 529=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 revert_creds(old_cred); >> =C2=A0=C2=A0=C2=A0 530 >> =C2=A0=C2=A0=C2=A0 531=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 vma->vm_file =3D file; >> =C2=A0=C2=A0=C2=A0 532=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (err) { >> =C2=A0=C2=A0=C2=A0 533=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 vma->vm_= ops =3D &ovl_vm_ops; >> =C2=A0=C2=A0=C2=A0 534=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return V= M_FAULT_SIGBUS; >> =C2=A0=C2=A0=C2=A0 535=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0 536=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ovl_set_real_vmops(file, vma->vm= _ops); >> =C2=A0=C2=A0=C2=A0 537=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 vma->vm_ops =3D &ovl_vm_ops; >> =C2=A0=C2=A0=C2=A0 538=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0 539 >> =C2=A0=C2=A0=C2=A0 540=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 retry_allowed =3D fault_flag_check(vmf, = >> FAULT_FLAG_ALLOW_RETRY); >> =C2=A0=C2=A0=C2=A0 541=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if (retry_allowed) >> =C2=A0=C2=A0=C2=A0 542=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 vma->vm_flags &=3D ~FAULT_FLAG_A= LLOW_RETRY; >> =C2=A0=C2=A0=C2=A0 543=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 vma->vm_file =3D realfile; >> =C2=A0=C2=A0=C2=A0 544=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ret =3D ovl_get_real_vmops(file)->fault(vmf); >> =C2=A0=C2=A0=C2=A0 545=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 vma->vm_file =3D file; >> =C2=A0=C2=A0=C2=A0 546=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if (retry_allowed) >> =C2=A0=C2=A0=C2=A0 547=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 vma->vm_flags |=3D FAULT_FLAG_AL= LOW_RETRY; >> =C2=A0=C2=A0=C2=A0 548=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 return ret; >> =C2=A0=C2=A0=C2=A0 549 >> =C2=A0=C2=A0=C2=A0 550=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } else { >> =C2=A0 > 551=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 fpin =3D maybe_unlock_mmap_for_io(vmf, NULL); >> =C2=A0=C2=A0=C2=A0 552=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if (!fpin) >> =C2=A0=C2=A0=C2=A0 553=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return VM_FAULT_SIGBUS; >> =C2=A0=C2=A0=C2=A0 554 >> =C2=A0=C2=A0=C2=A0 555=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ret =3D VM_FAULT_RETRY; >> =C2=A0=C2=A0=C2=A0 556=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if (!ovl_has_upperdata(inode)) { >> =C2=A0=C2=A0=C2=A0 557=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 err =3D ovl_copy_up_with_data(fi= le->f_path.dentry); >> =C2=A0=C2=A0=C2=A0 558=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (err) >> =C2=A0=C2=A0=C2=A0 559=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 goto out; >> =C2=A0=C2=A0=C2=A0 560=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0 561 >> =C2=A0=C2=A0=C2=A0 562=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 realinode =3D ovl_inode_realdata(inode); >> =C2=A0=C2=A0=C2=A0 563=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 realfile =3D ovl_open_realfile(file, realinode); >> =C2=A0=C2=A0=C2=A0 564=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 if (IS_ERR(realfile)) >> =C2=A0=C2=A0=C2=A0 565=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 goto out; >> =C2=A0=C2=A0=C2=A0 566 >> =C2=A0=C2=A0=C2=A0 567=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 tmp =3D ovl_get_realfile(file); >> =C2=A0=C2=A0=C2=A0 568=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ovl_set_realfile(file, realfile); >> =C2=A0=C2=A0=C2=A0 569=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 fput(tmp); >> =C2=A0=C2=A0=C2=A0 570 >> =C2=A0=C2=A0=C2=A0 571=C2=A0=C2=A0=C2=A0 out: >> =C2=A0=C2=A0=C2=A0 572=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 fput(fpin); >> =C2=A0=C2=A0=C2=A0 573=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 return ret; >> =C2=A0=C2=A0=C2=A0 574=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0 575=C2=A0=C2=A0=C2=A0 } >> =C2=A0=C2=A0=C2=A0 576 >> >> --- >> 0-DAY CI Kernel Test Service, Intel Corporation >> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org >> > --===============8273575549634787713==--