ovl: implement stacked mmap for shared map
Chen
Quoted 27 lines · cgxu
Quoted 26 lines · kernel test robot
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=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
-O ~/bin/make.cross
chmod +x ~/bin/make.cross# save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
Quoted 5 lines
Quoted 2 lines
If you fix the issue, kindly add following tag as appropriate
Reported-by kernel test robot <[email protected]>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
Quoted 128 lines
cgxu
Quoted 124 lines
All error/warnings (new ones prefixed by >>):
fs/overlayfs/file.c:37:14: warning: no previous prototype for 'ovl_get_realfile' [-Wmissing-prototypes]
37 | struct file *ovl_get_realfile(struct file *file) | ^~~~~~~~~~~~~~~~fs/overlayfs/file.c:44:6: warning: no previous prototype for 'ovl_set_realfile' [-Wmissing-prototypes]
44 | voidovl_set_realfile(struct file *file, struct file *realfile)
| ^~~~~~~~~~~~~~~~fs/overlayfs/file.c:51:36: warning: no previous prototype for 'ovl_get_real_vmops' [-Wmissing-prototypes]
51 | const structvm_operations_struct*ovl_get_real_vmops(struct file *file)
| ^~~~~~~~~~~~~~~~~~fs/overlayfs/file.c:58:6: warning: no previous prototype for 'ovl_set_real_vmops' [-Wmissing-prototypes]
58 | void ovl_set_real_vmops(struct file *file, | ^~~~~~~~~~~~~~~~~~fs/overlayfs/file.c: In function 'ovl_fault':Quoted 2 lines
Quoted 2 lines
fs/overlayfs/file.c:518:6: error: implicit declaration of function 'fault_flag_check' [-Werror=implicit-function-declaration]518 | if (
fault_flag_check(vmf, FAULT_FLAG_TRIED)) { | ^~~~~~~~~~~~~~~~Quoted 2 lines
Quoted 2 lines
fs/overlayfs/file.c:551:10: error: implicit declaration of function 'maybe_unlock_mmap_for_io' [-Werror=implicit-function-declaration]551 | fpin =
maybe_unlock_mmap_for_io(vmf, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~Quoted 3 lines
Quoted 3 lines
fs/overlayfs/file.c:551:8: warning: assignment to 'struct file *' from 'int' makes pointer from integer without a cast [-Wint-conversion]551 | fpin =
maybe_unlock_mmap_for_io(vmf, NULL); | ^
cc1: some warnings being treated as errors#
https://github.com/0day-ci/linux/commit/a33b1899ccf797aa55f56333a2700cfbc67487cc
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 checkouta33b1899ccf797aa55f56333a2700cfbc67487ccvim +/fault_flag_check +518fs/overlayfs/file.c504
505vm_fault_tovl_fault(struct vm_fault *vmf)
506 {
507 structvm_area_struct*vma =vmf->vma;
508 struct file *file =vma->vm_file;
509 struct file *realfile;
510 struct file *fpin, *tmp;
511 struct inode *inode =file_inode(file);
512 struct inode *realinode;
513 const struct cred*old_cred;
514 boolretry_allowed;
515vm_fault_tret;
516 int err = 0;
517
> 518 if (fault_flag_check(vmf, FAULT_FLAG_TRIED)) { 519 realfile =ovl_get_realfile(file);
520
521 if (!ovl_has_upperdata(inode) ||
522realfile->f_inode!=ovl_inode_upper(inode)|| 523 !realfile->f_op->mmap)
524 returnVM_FAULT_SIGBUS;
525
526 if (!ovl_get_real_vmops(file)) {
527old_cred=ovl_override_creds(inode->i_sb); 528 err =call_mmap(realfile, vma);
529revert_creds(old_cred);
530
531vma->vm_file= file;
532 if (err) {
533vma->vm_ops=&ovl_vm_ops;
534 returnVM_FAULT_SIGBUS;
535 }
536ovl_set_real_vmops(file, vma->vm_ops); 537vma->vm_ops=&ovl_vm_ops;
538 }
539
540retry_allowed=fault_flag_check(vmf, FAULT_FLAG_ALLOW_RETRY);
541 if (retry_allowed)
542vma->vm_flags&= ~FAULT_FLAG_ALLOW_RETRY; 543vma->vm_file= realfile;
544 ret = ovl_get_real_vmops(file)->fault(vmf); 545vma->vm_file= file;
546 if (retry_allowed)
547vma->vm_flags|=FAULT_FLAG_ALLOW_RETRY; 548 return ret;
549
550 } else {
> 551 fpin =maybe_unlock_mmap_for_io(vmf, NULL); 552 if (!fpin)
553 returnVM_FAULT_SIGBUS;
554
555 ret =VM_FAULT_RETRY;
556 if (!ovl_has_upperdata(inode)) {
557 err =ovl_copy_up_with_data(file->f_path.dentry); 558 if (err)
559 goto out;
560 }
561
562 realinode =ovl_inode_realdata(inode); 563 realfile =ovl_open_realfile(file, realinode); 564 if (IS_ERR(realfile))
565 goto out;
566
567 tmp =ovl_get_realfile(file);
568ovl_set_realfile(file, realfile);
569 fput(tmp);
570
571 out:
572 fput(fpin);
573 return ret;
574 }
575 }
576---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Quoted 27 lines · cgxu
Quoted 26 lines · kernel test robot
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=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
-O ~/bin/make.cross
chmod +x ~/bin/make.cross# save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
Quoted 5 lines
Quoted 2 lines
If you fix the issue, kindly add following tag as appropriate
Reported-by kernel test robot <[email protected]>It seems missed applying two previous patches in the patch set, actually, the patch set is based on miklos-vfs/overlayfs-next.
Hi cgxu,
The bot applied the patch set based on commit 4518dfcf761e3 which can be also found in miklos-vfs/overlayfs-next,
is the base commit not correct? or could you provide the base commit you used.
a33b1899ccf79 ovl: implement stacked mmap for shared map af28de469a59c ovl: introduce struct ovl_file_entry 3229f1dd50299 mm: mmap: export necessary functions for overlayfs' mmap 4518dfcf761e3 ovl: fix lookup of indexed hardlinks with metacopy
Best Regards,
Rong Chen
Quoted 128 lines
cgxu
Quoted 124 lines
All error/warnings (new ones prefixed by >>):
fs/overlayfs/file.c:37:14: warning: no previous prototype for 'ovl_get_realfile' [-Wmissing-prototypes]
37 | struct file *ovl_get_realfile(struct file *file) | ^~~~~~~~~~~~~~~~fs/overlayfs/file.c:44:6: warning: no previous prototype for 'ovl_set_realfile' [-Wmissing-prototypes]
44 | voidovl_set_realfile(struct file *file, struct file *realfile)
| ^~~~~~~~~~~~~~~~fs/overlayfs/file.c:51:36: warning: no previous prototype for 'ovl_get_real_vmops' [-Wmissing-prototypes]
51 | const structvm_operations_struct*ovl_get_real_vmops(struct file *file)
| ^~~~~~~~~~~~~~~~~~fs/overlayfs/file.c:58:6: warning: no previous prototype for 'ovl_set_real_vmops' [-Wmissing-prototypes]
58 | void ovl_set_real_vmops(struct file *file, | ^~~~~~~~~~~~~~~~~~fs/overlayfs/file.c: In function 'ovl_fault':Quoted 2 lines
Quoted 2 lines
fs/overlayfs/file.c:518:6: error: implicit declaration of function 'fault_flag_check' [-Werror=implicit-function-declaration]518 | if (
fault_flag_check(vmf, FAULT_FLAG_TRIED)) { | ^~~~~~~~~~~~~~~~Quoted 2 lines
Quoted 2 lines
fs/overlayfs/file.c:551:10: error: implicit declaration of function 'maybe_unlock_mmap_for_io' [-Werror=implicit-function-declaration]551 | fpin =
maybe_unlock_mmap_for_io(vmf, NULL); | ^~~~~~~~~~~~~~~~~~~~~~~~Quoted 3 lines
Quoted 3 lines
fs/overlayfs/file.c:551:8: warning: assignment to 'struct file *' from 'int' makes pointer from integer without a cast [-Wint-conversion]551 | fpin =
maybe_unlock_mmap_for_io(vmf, NULL); | ^
cc1: some warnings being treated as errors#
https://github.com/0day-ci/linux/commit/a33b1899ccf797aa55f56333a2700cfbc67487cc
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 checkouta33b1899ccf797aa55f56333a2700cfbc67487ccvim +/fault_flag_check +518fs/overlayfs/file.c504
505vm_fault_tovl_fault(struct vm_fault *vmf)
506 {
507 structvm_area_struct*vma =vmf->vma;
508 struct file *file =vma->vm_file;
509 struct file *realfile;
510 struct file *fpin, *tmp;
511 struct inode *inode =file_inode(file);
512 struct inode *realinode;
513 const struct cred*old_cred;
514 boolretry_allowed;
515vm_fault_tret;
516 int err = 0;
517
> 518 if (fault_flag_check(vmf, FAULT_FLAG_TRIED)) { 519 realfile =ovl_get_realfile(file);
520
521 if (!ovl_has_upperdata(inode) ||
522realfile->f_inode!=ovl_inode_upper(inode)|| 523 !realfile->f_op->mmap)
524 returnVM_FAULT_SIGBUS;
525
526 if (!ovl_get_real_vmops(file)) {
527old_cred=ovl_override_creds(inode->i_sb); 528 err =call_mmap(realfile, vma);
529revert_creds(old_cred);
530
531vma->vm_file= file;
532 if (err) {
533vma->vm_ops=&ovl_vm_ops;
534 returnVM_FAULT_SIGBUS;
535 }
536ovl_set_real_vmops(file, vma->vm_ops); 537vma->vm_ops=&ovl_vm_ops;
538 }
539
540retry_allowed=fault_flag_check(vmf, FAULT_FLAG_ALLOW_RETRY);
541 if (retry_allowed)
542vma->vm_flags&= ~FAULT_FLAG_ALLOW_RETRY; 543vma->vm_file= realfile;
544 ret = ovl_get_real_vmops(file)->fault(vmf); 545vma->vm_file= file;
546 if (retry_allowed)
547vma->vm_flags|=FAULT_FLAG_ALLOW_RETRY; 548 return ret;
549
550 } else {
> 551 fpin =maybe_unlock_mmap_for_io(vmf, NULL); 552 if (!fpin)
553 returnVM_FAULT_SIGBUS;
554
555 ret =VM_FAULT_RETRY;
556 if (!ovl_has_upperdata(inode)) {
557 err =ovl_copy_up_with_data(file->f_path.dentry); 558 if (err)
559 goto out;
560 }
561
562 realinode =ovl_inode_realdata(inode); 563 realfile =ovl_open_realfile(file, realinode); 564 if (IS_ERR(realfile))
565 goto out;
566
567 tmp =ovl_get_realfile(file);
568ovl_set_realfile(file, realfile);
569 fput(tmp);
570
571 out:
572 fput(fpin);
573 return ret;
574 }
575 }
576---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org