[PATCH 2/2] NFSv4 account for selinux security context when deciding to share superblock
kernel test robot
lkp at intel.com
Sat Feb 13 00:10:44 UTC 2021
Hi Olga,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on nfs/linux-next]
[also build test ERROR on pcmoore-selinux/next linus/master security/next-testing v5.11-rc7 next-20210211]
[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/Olga-Kornievskaia/Add-new-hook-to-compare-new-mount-to-an-existing-mount/20210213-052321
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: x86_64-randconfig-r011-20210212 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/ff69e0bcc99716695e11ed2741b2e01d6014f960
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Olga-Kornievskaia/Add-new-hook-to-compare-new-mount-to-an-existing-mount/20210213-052321
git checkout ff69e0bcc99716695e11ed2741b2e01d6014f960
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
>> fs/nfs/super.c:1179:5: error: implicit declaration of function 'security_sb_do_mnt_opts_match' [-Werror,-Wimplicit-function-declaration]
!security_sb_do_mnt_opts_match(sb, fc->security))
^
fs/nfs/super.c:1179:5: note: did you mean 'security_sb_set_mnt_opts'?
include/linux/security.h:673:19: note: 'security_sb_set_mnt_opts' declared here
static inline int security_sb_set_mnt_opts(struct super_block *sb,
^
1 error generated.
vim +/security_sb_do_mnt_opts_match +1179 fs/nfs/super.c
1164
1165 static int nfs_compare_super(struct super_block *sb, struct fs_context *fc)
1166 {
1167 struct nfs_server *server = fc->s_fs_info, *old = NFS_SB(sb);
1168
1169 if (!nfs_compare_super_address(old, server))
1170 return 0;
1171 /* Note: NFS_MOUNT_UNSHARED == NFS4_MOUNT_UNSHARED */
1172 if (old->flags & NFS_MOUNT_UNSHARED)
1173 return 0;
1174 if (memcmp(&old->fsid, &server->fsid, sizeof(old->fsid)) != 0)
1175 return 0;
1176 if (!nfs_compare_userns(old, server))
1177 return 0;
1178 if ((old->has_sec_mnt_opts || fc->security) &&
> 1179 !security_sb_do_mnt_opts_match(sb, fc->security))
1180 return 0;
1181 return nfs_compare_mount_options(sb, server, fc);
1182 }
1183
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
More information about the Linux-security-module-archive
mailing list