[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210190132.HPPUQUGo-lkp@intel.com>
Date: Wed, 19 Oct 2022 01:16:58 +0800
From: kernel test robot <lkp@...el.com>
To: Christian Brauner <brauner@...nel.org>
Cc: kbuild-all@...ts.01.org, Ammar Faizi <ammarfaizi2@...weeb.org>,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:brauner/linux/fs.acl.rework 24/30]
fs/xattr.c:607: undefined reference to `do_set_acl'
tree: https://github.com/ammarfaizi2/linux-block brauner/linux/fs.acl.rework
head: 20071fc5cffe47b39d8c7878d3d4ada115b2bdb1
commit: d952d98ae960db9693067d972f750a8bf9960ee3 [24/30] xattr: use posix acl api
config: um-i386_defconfig
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/ammarfaizi2/linux-block/commit/d952d98ae960db9693067d972f750a8bf9960ee3
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block brauner/linux/fs.acl.rework
git checkout d952d98ae960db9693067d972f750a8bf9960ee3
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
/usr/bin/ld: warning: arch/x86/um/checksum_32.o: missing .note.GNU-stack section implies executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
/usr/bin/ld: warning: .tmp_vmlinux.kallsyms1 has a LOAD segment with RWX permissions
/usr/bin/ld: fs/xattr.o: in function `do_setxattr':
>> fs/xattr.c:607: undefined reference to `do_set_acl'
/usr/bin/ld: fs/xattr.o: in function `do_getxattr':
>> fs/xattr.c:717: undefined reference to `do_get_acl'
collect2: error: ld returned 1 exit status
vim +607 fs/xattr.c
602
603 int do_setxattr(struct user_namespace *mnt_userns, struct dentry *dentry,
604 struct xattr_ctx *ctx)
605 {
606 if (is_posix_acl_xattr(ctx->kname->name))
> 607 return do_set_acl(mnt_userns, dentry, ctx->kname->name,
608 ctx->kvalue, ctx->size);
609
610 return vfs_setxattr(mnt_userns, dentry, ctx->kname->name,
611 ctx->kvalue, ctx->size, ctx->flags);
612 }
613
614 static long
615 setxattr(struct user_namespace *mnt_userns, struct dentry *d,
616 const char __user *name, const void __user *value, size_t size,
617 int flags)
618 {
619 struct xattr_name kname;
620 struct xattr_ctx ctx = {
621 .cvalue = value,
622 .kvalue = NULL,
623 .size = size,
624 .kname = &kname,
625 .flags = flags,
626 };
627 int error;
628
629 error = setxattr_copy(name, &ctx);
630 if (error)
631 return error;
632
633 error = do_setxattr(mnt_userns, d, &ctx);
634
635 kvfree(ctx.kvalue);
636 return error;
637 }
638
639 static int path_setxattr(const char __user *pathname,
640 const char __user *name, const void __user *value,
641 size_t size, int flags, unsigned int lookup_flags)
642 {
643 struct path path;
644 int error;
645
646 retry:
647 error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path);
648 if (error)
649 return error;
650 error = mnt_want_write(path.mnt);
651 if (!error) {
652 error = setxattr(mnt_user_ns(path.mnt), path.dentry, name,
653 value, size, flags);
654 mnt_drop_write(path.mnt);
655 }
656 path_put(&path);
657 if (retry_estale(error, lookup_flags)) {
658 lookup_flags |= LOOKUP_REVAL;
659 goto retry;
660 }
661 return error;
662 }
663
664 SYSCALL_DEFINE5(setxattr, const char __user *, pathname,
665 const char __user *, name, const void __user *, value,
666 size_t, size, int, flags)
667 {
668 return path_setxattr(pathname, name, value, size, flags, LOOKUP_FOLLOW);
669 }
670
671 SYSCALL_DEFINE5(lsetxattr, const char __user *, pathname,
672 const char __user *, name, const void __user *, value,
673 size_t, size, int, flags)
674 {
675 return path_setxattr(pathname, name, value, size, flags, 0);
676 }
677
678 SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
679 const void __user *,value, size_t, size, int, flags)
680 {
681 struct fd f = fdget(fd);
682 int error = -EBADF;
683
684 if (!f.file)
685 return error;
686 audit_file(f.file);
687 error = mnt_want_write_file(f.file);
688 if (!error) {
689 error = setxattr(file_mnt_user_ns(f.file),
690 f.file->f_path.dentry, name,
691 value, size, flags);
692 mnt_drop_write_file(f.file);
693 }
694 fdput(f);
695 return error;
696 }
697
698 /*
699 * Extended attribute GET operations
700 */
701 ssize_t
702 do_getxattr(struct user_namespace *mnt_userns, struct dentry *d,
703 struct xattr_ctx *ctx)
704 {
705 ssize_t error;
706 char *kname = ctx->kname->name;
707
708 if (ctx->size) {
709 if (ctx->size > XATTR_SIZE_MAX)
710 ctx->size = XATTR_SIZE_MAX;
711 ctx->kvalue = kvzalloc(ctx->size, GFP_KERNEL);
712 if (!ctx->kvalue)
713 return -ENOMEM;
714 }
715
716 if (is_posix_acl_xattr(ctx->kname->name))
> 717 error = do_get_acl(mnt_userns, d, kname, ctx->kvalue, ctx->size);
718 else
719 error = vfs_getxattr(mnt_userns, d, kname, ctx->kvalue, ctx->size);
720 if (error > 0) {
721 if (ctx->size && copy_to_user(ctx->value, ctx->kvalue, error))
722 error = -EFAULT;
723 } else if (error == -ERANGE && ctx->size >= XATTR_SIZE_MAX) {
724 /* The file system tried to returned a value bigger
725 than XATTR_SIZE_MAX bytes. Not possible. */
726 error = -E2BIG;
727 }
728
729 return error;
730 }
731
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (42256 bytes)
Powered by blists - more mailing lists