From: kernel test robot <lkp@intel.com>
To: Boris Burkov <boris@bur.io>,
linux-btrfs@vger.kernel.org, linux-fscrypt@vger.kernel.org,
kernel-team@fb.com
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com
Subject: Re: [PATCH v4 2/5] btrfs: initial fsverity support
Date: Thu, 6 May 2021 08:09:43 +0800 [thread overview]
Message-ID: <202105060856.AvXJf1Ew-lkp@intel.com> (raw)
In-Reply-To: <dd0cfc38c6de927de63f34f96499dc8f80398754.1620241221.git.boris@bur.io>
[-- Attachment #1: Type: text/plain, Size: 4547 bytes --]
Hi Boris,
I love your patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[cannot apply to v5.12 next-20210505]
[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/Boris-Burkov/btrfs-add-compat_flags-to-btrfs_inode_item/20210506-042129
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: x86_64-randconfig-a014-20210505 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
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/f61feb554b6d2710f17960a9775bf9ba41bb2dc2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Boris-Burkov/btrfs-add-compat_flags-to-btrfs_inode_item/20210506-042129
git checkout f61feb554b6d2710f17960a9775bf9ba41bb2dc2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/btrfs/verity.c:434:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (desc != NULL) {
^~~~~~~~~~~~
fs/btrfs/verity.c:470:9: note: uninitialized use occurs here
return ret;
^~~
fs/btrfs/verity.c:434:2: note: remove the 'if' if its condition is always true
if (desc != NULL) {
^~~~~~~~~~~~~~~~~~
fs/btrfs/verity.c:432:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +434 fs/btrfs/verity.c
417
418 /*
419 * fsverity op that ends enabling verity.
420 * fsverity calls this when it's done with all of the pages in the file
421 * and all of the merkle items have been inserted. We write the
422 * descriptor and update the inode in the btree to reflect its new life
423 * as a verity file.
424 */
425 static int btrfs_end_enable_verity(struct file *filp, const void *desc,
426 size_t desc_size, u64 merkle_tree_size)
427 {
428 struct btrfs_trans_handle *trans;
429 struct inode *inode = file_inode(filp);
430 struct btrfs_root *root = BTRFS_I(inode)->root;
431 struct btrfs_verity_descriptor_item item;
432 int ret;
433
> 434 if (desc != NULL) {
435 /* write out the descriptor item */
436 memset(&item, 0, sizeof(item));
437 btrfs_set_stack_verity_descriptor_size(&item, desc_size);
438 ret = write_key_bytes(BTRFS_I(inode),
439 BTRFS_VERITY_DESC_ITEM_KEY, 0,
440 (const char *)&item, sizeof(item));
441 if (ret)
442 goto out;
443 /* write out the descriptor itself */
444 ret = write_key_bytes(BTRFS_I(inode),
445 BTRFS_VERITY_DESC_ITEM_KEY, 1,
446 desc, desc_size);
447 if (ret)
448 goto out;
449
450 /* update our inode flags to include fs verity */
451 trans = btrfs_start_transaction(root, 1);
452 if (IS_ERR(trans)) {
453 ret = PTR_ERR(trans);
454 goto out;
455 }
456 BTRFS_I(inode)->compat_flags |= BTRFS_INODE_VERITY;
457 btrfs_sync_inode_flags_to_i_flags(inode);
458 ret = btrfs_update_inode(trans, root, BTRFS_I(inode));
459 btrfs_end_transaction(trans);
460 }
461
462 out:
463 if (desc == NULL || ret) {
464 /* If we failed, drop all the verity items */
465 drop_verity_items(BTRFS_I(inode), BTRFS_VERITY_DESC_ITEM_KEY);
466 drop_verity_items(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY);
467 } else
468 btrfs_set_fs_compat_ro(root->fs_info, VERITY);
469 clear_bit(BTRFS_INODE_VERITY_IN_PROGRESS, &BTRFS_I(inode)->runtime_flags);
470 return ret;
471 }
472
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35932 bytes --]
next prev parent reply other threads:[~2021-05-06 0:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1620241221.git.boris@bur.io>
2021-05-05 19:20 ` [PATCH v4 1/5] btrfs: add compat_flags to btrfs_inode_item Boris Burkov
2021-05-11 19:11 ` David Sterba
2021-05-17 21:48 ` David Sterba
2021-05-19 21:45 ` Boris Burkov
2021-06-07 21:43 ` David Sterba
2021-05-25 18:12 ` Eric Biggers
2021-06-07 21:10 ` David Sterba
2021-05-05 19:20 ` [PATCH v4 2/5] btrfs: initial fsverity support Boris Burkov
2021-05-06 0:09 ` kernel test robot [this message]
2021-05-11 19:20 ` David Sterba
2021-05-11 20:31 ` David Sterba
2021-05-11 21:52 ` Boris Burkov
2021-05-12 17:10 ` David Sterba
2021-05-13 19:19 ` Boris Burkov
2021-05-17 21:40 ` David Sterba
2021-05-12 17:34 ` David Sterba
2021-05-05 19:20 ` [PATCH v4 3/5] btrfs: check verity for reads of inline extents and holes Boris Burkov
2021-05-12 17:57 ` David Sterba
2021-05-12 18:25 ` Boris Burkov
2021-05-05 19:20 ` [PATCH v4 4/5] btrfs: fallback to buffered io for verity files Boris Burkov
2021-05-05 19:20 ` [PATCH v4 5/5] btrfs: verity metadata orphan items Boris Burkov
2021-05-12 17:48 ` David Sterba
2021-05-12 18:08 ` Boris Burkov
2021-05-12 23:36 ` David Sterba
2021-05-05 19:20 [PATCH v4 0/5] btrfs: support fsverity Boris Burkov
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=202105060856.AvXJf1Ew-lkp@intel.com \
--to=lkp@intel.com \
--cc=boris@bur.io \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
/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).