From: kernel test robot <lkp@intel.com>
To: Boris Burkov <boris@bur.io>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com,
Eric Biggers <ebiggers@kernel.org>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com
Subject: Re: [PATCH 2/5] btrfs: initial fsverity support
Date: Fri, 5 Feb 2021 13:37:57 +0800 [thread overview]
Message-ID: <202102051339.AUWy8iMu-lkp@intel.com> (raw)
In-Reply-To: <88389022bd9f264f215c9d85fe48214190402fd6.1612475783.git.boris@bur.io>
[-- Attachment #1: Type: text/plain, Size: 3999 bytes --]
Hi Boris,
I love your patch! Perhaps something to improve:
[auto build test WARNING on v5.11-rc6]
[also build test WARNING on next-20210125]
[cannot apply to kdave/for-next]
[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-support-fsverity/20210205-072745
base: 1048ba83fb1c00cd24172e23e8263972f6b5d9ac
config: x86_64-randconfig-a002-20210204 (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/4fb68eb17c9ed350a759646451cba99a19ea7579
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Boris-Burkov/btrfs-support-fsverity/20210205-072745
git checkout 4fb68eb17c9ed350a759646451cba99a19ea7579
# 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@intel.com>
All warnings (new ones prefixed by >>):
>> fs/btrfs/verity.c:370:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (desc != NULL) {
^~~~~~~~~~~~
fs/btrfs/verity.c:397:9: note: uninitialized use occurs here
return ret;
^~~
fs/btrfs/verity.c:370:2: note: remove the 'if' if its condition is always true
if (desc != NULL) {
^~~~~~~~~~~~~~~~~~
fs/btrfs/verity.c:368:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +370 fs/btrfs/verity.c
355
356 /*
357 * fsverity calls this when it's done with all of the pages in the file
358 * and all of the merkle items have been inserted. We write the
359 * descriptor and update the inode in the btree to reflect it's new life
360 * as a verity file
361 */
362 static int btrfs_end_enable_verity(struct file *filp, const void *desc,
363 size_t desc_size, u64 merkle_tree_size)
364 {
365 struct btrfs_trans_handle *trans;
366 struct inode *inode = file_inode(filp);
367 struct btrfs_root *root = BTRFS_I(inode)->root;
368 int ret;
369
> 370 if (desc != NULL) {
371 /* write out the descriptor */
372 ret = write_key_bytes(BTRFS_I(inode),
373 BTRFS_VERITY_DESC_ITEM_KEY, 0,
374 desc, desc_size);
375 if (ret)
376 goto out;
377
378 /* update our inode flags to include fs verity */
379 trans = btrfs_start_transaction(root, 1);
380 if (IS_ERR(trans)) {
381 ret = PTR_ERR(trans);
382 goto out;
383 }
384 BTRFS_I(inode)->compat_flags |= BTRFS_INODE_VERITY;
385 btrfs_sync_inode_flags_to_i_flags(inode);
386 ret = btrfs_update_inode(trans, root, BTRFS_I(inode));
387 btrfs_end_transaction(trans);
388 }
389
390 out:
391 if (desc == NULL || ret) {
392 /* If we failed, drop all the verity items */
393 drop_verity_items(BTRFS_I(inode), BTRFS_VERITY_DESC_ITEM_KEY);
394 drop_verity_items(BTRFS_I(inode), BTRFS_VERITY_MERKLE_ITEM_KEY);
395 }
396 clear_bit(BTRFS_INODE_VERITY_IN_PROGRESS, &BTRFS_I(inode)->runtime_flags);
397 return ret;
398 }
399
---
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: 35375 bytes --]
next prev parent reply other threads:[~2021-02-05 5:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 23:21 [PATCH 0/5] btrfs: support fsverity Boris Burkov
2021-02-04 23:21 ` [PATCH 1/5] btrfs: add compat_flags to btrfs_inode_item Boris Burkov
2021-02-04 23:21 ` [PATCH 2/5] btrfs: initial fsverity support Boris Burkov
2021-02-05 3:07 ` kernel test robot
2021-02-05 3:21 ` kernel test robot
2021-02-05 5:37 ` kernel test robot [this message]
2021-02-05 6:39 ` Eric Biggers
2021-02-05 18:14 ` Chris Mason
2021-02-05 8:06 ` Nikolay Borisov
2021-02-05 15:50 ` Chris Mason
2021-02-09 17:57 ` Boris Burkov
2021-02-04 23:21 ` [PATCH 3/5] btrfs: check verity for reads of inline extents and holes Boris Burkov
2021-02-04 23:21 ` [PATCH 4/5] btrfs: fallback to buffered io for verity files Boris Burkov
2021-02-04 23:21 ` [PATCH 5/5] btrfs: add sysfs feature for fsverity Boris Burkov
2021-02-05 6:13 ` [PATCH 0/5] btrfs: support fsverity Eric Biggers
2021-02-05 6:58 ` Boris Burkov
2021-02-05 16:06 ` Chris Mason
2021-02-12 1:19 ` Zygo Blaxell
2021-02-12 17:43 ` 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=202102051339.AUWy8iMu-lkp@intel.com \
--to=lkp@intel.com \
--cc=boris@bur.io \
--cc=clang-built-linux@googlegroups.com \
--cc=ebiggers@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@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).