[PATCH v17 2/4] overlayfs: handle XATTR_NOSECURITY flag for get xattr method

kernel test robot lkp at intel.com
Tue Oct 20 22:38:35 UTC 2020


Hi Mark,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on miklos-vfs/overlayfs-next]
[also build test ERROR on linus/master next-20201016]
[cannot apply to ext4/dev security/next-testing v5.9]
[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/Mark-Salyzyn/overlayfs-override_creds-off-nested-get-xattr-fix/20201021-031941
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-next
config: sparc-randconfig-s031-20201020 (attached as .config)
compiler: sparc-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.3-dirty
        # https://github.com/0day-ci/linux/commit/4db43126fb07e97fad2a0f2eda02fa73b8e07f21
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Mark-Salyzyn/overlayfs-override_creds-off-nested-get-xattr-fix/20201021-031941
        git checkout 4db43126fb07e97fad2a0f2eda02fa73b8e07f21
        # 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=sparc 

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 >>):

   In file included from fs/overlayfs/super.c:18:
   fs/overlayfs/overlayfs.h: In function 'ovl_do_getxattr':
>> fs/overlayfs/overlayfs.h:187:25: error: initialization of 'struct ovl_inode *' from incompatible pointer type 'struct inode *' [-Werror=incompatible-pointer-types]
     187 |  struct ovl_inode *ip = d_inode(dentry);
         |                         ^~~~~~~
>> fs/overlayfs/overlayfs.h:189:32: error: passing argument 2 of '__vfs_getxattr' from incompatible pointer type [-Werror=incompatible-pointer-types]
     189 |  return __vfs_getxattr(dentry, ip, name, value, size, XATTR_NOSECURITY);
         |                                ^~
         |                                |
         |                                struct ovl_inode *
   In file included from fs/overlayfs/super.c:10:
   include/linux/xattr.h:50:61: note: expected 'struct inode *' but argument is of type 'struct ovl_inode *'
      50 | ssize_t __vfs_getxattr(struct dentry *dentry, struct inode *inode,
         |                                               ~~~~~~~~~~~~~~^~~~~
   cc1: some warnings being treated as errors

vim +187 fs/overlayfs/overlayfs.h

   181	
   182	static inline ssize_t ovl_do_getxattr(struct ovl_fs *ofs, struct dentry *dentry,
   183					      enum ovl_xattr ox, void *value,
   184					      size_t size)
   185	{
   186		const char *name = ovl_xattr(ofs, ox);
 > 187		struct ovl_inode *ip = d_inode(dentry);
   188	
 > 189		return __vfs_getxattr(dentry, ip, name, value, size, XATTR_NOSECURITY);
   190	}
   191	

---
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