lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209260159.VQztfVzT-lkp@intel.com>
Date:   Mon, 26 Sep 2022 02:06:37 +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.v1 12/37]
 fs/cifs/cifssmb.c:3229:21: sparse: sparse: incorrect type in assignment
 (different base types)

tree:   https://github.com/ammarfaizi2/linux-block brauner/linux/fs.acl.rework.v1
head:   6d56d354d97c08df55b4c06e1f45903f000b7c7c
commit: 38cc77ebad48e4a1a8e5021445e013080bda5fdd [12/37] cifs: implement get acl method
config: arm64-randconfig-s051-20220925
compiler: aarch64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
        # https://github.com/ammarfaizi2/linux-block/commit/38cc77ebad48e4a1a8e5021445e013080bda5fdd
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block brauner/linux/fs.acl.rework.v1
        git checkout 38cc77ebad48e4a1a8e5021445e013080bda5fdd
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash fs/cifs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
>> fs/cifs/cifssmb.c:3229:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short e_perm @@     got restricted __le16 [usertype] @@
   fs/cifs/cifssmb.c:3229:21: sparse:     expected unsigned short e_perm
   fs/cifs/cifssmb.c:3229:21: sparse:     got restricted __le16 [usertype]
>> fs/cifs/cifssmb.c:3230:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected short e_tag @@     got restricted __le16 [usertype] @@
   fs/cifs/cifssmb.c:3230:21: sparse:     expected short e_tag
   fs/cifs/cifssmb.c:3230:21: sparse:     got restricted __le16 [usertype]
>> fs/cifs/cifssmb.c:3234:35: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] uid @@     got restricted __le32 [usertype] @@
   fs/cifs/cifssmb.c:3234:35: sparse:     expected unsigned int [usertype] uid
   fs/cifs/cifssmb.c:3234:35: sparse:     got restricted __le32 [usertype]
>> fs/cifs/cifssmb.c:3238:35: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned int [usertype] gid @@     got restricted __le32 [usertype] @@
   fs/cifs/cifssmb.c:3238:35: sparse:     expected unsigned int [usertype] gid
   fs/cifs/cifssmb.c:3238:35: sparse:     got restricted __le32 [usertype]

vim +3229 fs/cifs/cifssmb.c

  3214	
  3215	/**
  3216	 * cifs_init_posix_acl - convert ACL from cifs to POSIX ACL format
  3217	 * @ace: POSIX ACL entry to store converted ACL into
  3218	 * @cifs: ACL in cifs format
  3219	 *
  3220	 * Convert an Access Control Entry from wire format to local POSIX xattr
  3221	 * format.
  3222	 *
  3223	 * Note that the @cifs_uid member is used to store both {g,u}id_t.
  3224	 */
  3225	static void cifs_init_posix_acl(struct posix_acl_entry *ace,
  3226					struct cifs_posix_ace *cifs_ace)
  3227	{
  3228		/* u8 cifs fields do not need le conversion */
> 3229		ace->e_perm = cpu_to_le16(cifs_ace->cifs_e_perm);
> 3230		ace->e_tag  = cpu_to_le16(cifs_ace->cifs_e_tag);
  3231		switch (ace->e_tag) {
  3232		case ACL_USER:
  3233			ace->e_uid = make_kuid(&init_user_ns,
> 3234					  cpu_to_le32(le64_to_cpu(cifs_ace->cifs_uid)));
  3235			break;
  3236		case ACL_GROUP:
  3237			ace->e_gid = make_kgid(&init_user_ns,
> 3238					  cpu_to_le32(le64_to_cpu(cifs_ace->cifs_uid)));
  3239			break;
  3240		}
  3241	/*
  3242		cifs_dbg(FYI, "perm %d tag %d id %d\n",
  3243			 ace->e_perm, ace->e_tag, ace->e_id);
  3244	*/
  3245	
  3246		return;
  3247	}
  3248	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (216543 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ