From: kernel test robot <lkp@intel.com>
To: Sheng Yong <shengyong@oppo.com>, jaegeuk@kernel.org, chao@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, oe-kbuild-all@lists.linux.dev
Subject: Re: [f2fs-dev] [PATCH] f2fs: add f2fs_ioc_[get|set]_extra_attr
Date: Mon, 29 May 2023 14:20:35 +0800 [thread overview]
Message-ID: <202305291408.kdy2Itan-lkp@intel.com> (raw)
In-Reply-To: <20230529013502.2230810-1-shengyong@oppo.com>
Hi Sheng,
kernel test robot noticed the following build warnings:
[auto build test WARNING on jaegeuk-f2fs/dev-test]
[also build test WARNING on jaegeuk-f2fs/dev next-20230525]
[cannot apply to linus/master v6.4-rc4]
[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#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Sheng-Yong/f2fs-add-f2fs_ioc_-get-set-_extra_attr/20230529-093611
base: https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git dev-test
patch link: https://lore.kernel.org/r/20230529013502.2230810-1-shengyong%40oppo.com
patch subject: [PATCH] f2fs: add f2fs_ioc_[get|set]_extra_attr
config: arc-buildonly-randconfig-r004-20230529 (https://download.01.org/0day-ci/archive/20230529/202305291408.kdy2Itan-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/519a8b3bbd4d743ae67c32dfef61e8bfa0951cc5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Sheng-Yong/f2fs-add-f2fs_ioc_-get-set-_extra_attr/20230529-093611
git checkout 519a8b3bbd4d743ae67c32dfef61e8bfa0951cc5
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 ~/bin/make.cross W=1 O=build_dir ARCH=arc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 ~/bin/make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash fs/f2fs/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202305291408.kdy2Itan-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/f2fs/file.c: In function 'f2fs_ioc_get_extra_attr':
>> fs/f2fs/file.c:4312:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
4312 | (void __user *)attr.attr))
| ^
fs/f2fs/file.c:4316:48: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
4316 | (void __user *)attr.attr))
| ^
vim +4312 fs/f2fs/file.c
4262
4263 static int f2fs_ioc_get_extra_attr(struct file *filp, unsigned long arg)
4264 {
4265 struct inode *inode = file_inode(filp);
4266 struct f2fs_inode_info *fi = F2FS_I(inode);
4267 struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
4268 struct f2fs_extra_attr attr;
4269 u32 chksum;
4270 int ret = 0;
4271
4272 if (!f2fs_has_extra_attr(inode))
4273 return -EOPNOTSUPP;
4274
4275 if (copy_from_user(&attr, (void __user *)arg, sizeof(attr)))
4276 return -EFAULT;
4277
4278 if (attr.field >= F2FS_EXTRA_ATTR_MAX)
4279 return -EINVAL;
4280
4281 if (!extra_attr_fits_in_inode(inode, attr.field))
4282 return -EOPNOTSUPP;
4283
4284 switch (attr.field) {
4285 case F2FS_EXTRA_ATTR_TOTAL_SIZE:
4286 attr.attr = F2FS_TOTAL_EXTRA_ATTR_SIZE;
4287 break;
4288 case F2FS_EXTRA_ATTR_ISIZE:
4289 attr.attr = fi->i_extra_isize;
4290 break;
4291 case F2FS_EXTRA_ATTR_INLINE_XATTR_SIZE:
4292 if (!f2fs_has_inline_xattr(inode))
4293 return -EOPNOTSUPP;
4294 attr.attr = get_inline_xattr_addrs(inode);
4295 break;
4296 case F2FS_EXTRA_ATTR_PROJID:
4297 if (!f2fs_sb_has_project_quota(F2FS_I_SB(inode)))
4298 return -EOPNOTSUPP;
4299 attr.attr = from_kprojid(&init_user_ns, fi->i_projid);
4300 break;
4301 case F2FS_EXTRA_ATTR_INODE_CHKSUM:
4302 ret = f2fs_inode_chksum_get(sbi, inode, &chksum);
4303 if (ret)
4304 return ret;
4305 attr.attr = chksum;
4306 break;
4307 case F2FS_EXTRA_ATTR_CRTIME:
4308 if (!f2fs_sb_has_inode_crtime(sbi))
4309 return -EOPNOTSUPP;
4310 if (attr.attr_size == sizeof(struct timespec64)) {
4311 if (put_timespec64(&fi->i_crtime,
> 4312 (void __user *)attr.attr))
4313 return -EFAULT;
4314 } else if (attr.attr_size == sizeof(struct old_timespec32)) {
4315 if (put_old_timespec32(&fi->i_crtime,
4316 (void __user *)attr.attr))
4317 return -EFAULT;
4318 } else {
4319 return -EINVAL;
4320 }
4321 break;
4322 case F2FS_EXTRA_ATTR_COMPR_BLOCKS:
4323 ret = f2fs_get_compress_blocks(filp, attr.attr_size);
4324 attr.attr = ret;
4325 break;
4326 case F2FS_EXTRA_ATTR_COMPR_OPTION:
4327 ret = f2fs_get_compress_option_v2(filp, attr.attr,
4328 &attr.attr_size);
4329 break;
4330 default:
4331 return -EINVAL;
4332 }
4333
4334 if (ret < 0)
4335 return ret;
4336
4337 if (copy_to_user((void __user *)arg, &attr, sizeof(attr)))
4338 return -EFAULT;
4339
4340 return 0;
4341 }
4342
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2023-05-29 6:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 1:35 [f2fs-dev] [PATCH] f2fs: add f2fs_ioc_[get|set]_extra_attr Sheng Yong via Linux-f2fs-devel
2023-05-29 1:35 ` [f2fs-dev] [PATCH 1/2] f2fs_io: add [get|set_attr] to access inode extra attributes Sheng Yong via Linux-f2fs-devel
2023-06-01 3:13 ` Chao Yu
2023-06-04 3:56 ` [f2fs-dev] [PATCH v2 " Sheng Yong via Linux-f2fs-devel
2023-06-04 3:56 ` [f2fs-dev] [PATCH v2 2/2] f2fs_io: convert compression ioctls to [get|set]_attr Sheng Yong via Linux-f2fs-devel
2023-05-29 1:35 ` [f2fs-dev] [PATCH " Sheng Yong via Linux-f2fs-devel
2023-05-29 6:10 ` [f2fs-dev] [PATCH] f2fs: add f2fs_ioc_[get|set]_extra_attr kernel test robot
2023-05-29 6:20 ` kernel test robot [this message]
2023-05-29 8:19 ` kernel test robot
2023-05-30 6:34 ` [f2fs-dev] [PATCH v2] " Sheng Yong via Linux-f2fs-devel
2023-06-01 3:06 ` Chao Yu
2023-06-04 2:28 ` [f2fs-dev] [PATCH v3] " Sheng Yong via Linux-f2fs-devel
2023-06-07 17:09 ` Jaegeuk Kim
2023-06-01 3:16 ` [f2fs-dev] [PATCH] " Eric Biggers
2023-06-01 14:37 ` Sheng Yong via Linux-f2fs-devel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202305291408.kdy2Itan-lkp@intel.com \
--to=lkp@intel.com \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=shengyong@oppo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).