From: kbuild test robot <lkp@intel.com>
To: Johannes Thumshirn <jth@kernel.org>, David Sterba <dsterba@suse.cz>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org,
Eric Biggers <ebiggers@google.com>,
Richard Weinberger <richard@nod.at>,
Johannes Thumshirn <johannes.thumshirn@wdc.com>
Subject: Re: [PATCH v2 1/2] btrfs: add authentication support
Date: Wed, 29 Apr 2020 15:23:56 +0800 [thread overview]
Message-ID: <202004291518.v6EvXXNe%lkp@intel.com> (raw)
In-Reply-To: <20200428105859.4719-2-jth@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 5836 bytes --]
Hi Johannes,
I love your patch! Yet something to improve:
[auto build test ERROR on kdave/for-next]
[also build test ERROR on v5.7-rc3 next-20200428]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Johannes-Thumshirn/Add-file-system-authentication-to-BTRFS/20200429-030930
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: x86_64-randconfig-d002-20200428 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project f30416fdde922eaa655934e050026930fefbd260)
reproduce:
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
# 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: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> fs/btrfs/disk-io.c:2227:8: error: implicit declaration of function 'request_key' [-Werror,-Wimplicit-function-declaration]
key = request_key(&key_type_logon, fs_info->auth_key_name, NULL);
^
>> fs/btrfs/disk-io.c:2227:21: error: use of undeclared identifier 'key_type_logon'
key = request_key(&key_type_logon, fs_info->auth_key_name, NULL);
^
>> fs/btrfs/disk-io.c:2231:16: error: incomplete definition of type 'struct key'
down_read(&key->sem);
~~~^
include/linux/key.h:33:8: note: forward declaration of 'struct key'
struct key;
^
>> fs/btrfs/disk-io.c:2233:8: error: implicit declaration of function 'user_key_payload_locked' [-Werror,-Wimplicit-function-declaration]
ukp = user_key_payload_locked(key);
^
>> fs/btrfs/disk-io.c:2233:6: warning: incompatible integer to pointer conversion assigning to 'const struct user_key_payload *' from 'int' [-Wint-conversion]
ukp = user_key_payload_locked(key);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> fs/btrfs/disk-io.c:2240:52: error: incomplete definition of type 'struct user_key_payload'
err = crypto_shash_setkey(fs_info->csum_shash, ukp->data, ukp->datalen);
~~~^
fs/btrfs/disk-io.c:2193:15: note: forward declaration of 'struct user_key_payload'
const struct user_key_payload *ukp;
^
fs/btrfs/disk-io.c:2240:63: error: incomplete definition of type 'struct user_key_payload'
err = crypto_shash_setkey(fs_info->csum_shash, ukp->data, ukp->datalen);
~~~^
fs/btrfs/disk-io.c:2193:15: note: forward declaration of 'struct user_key_payload'
const struct user_key_payload *ukp;
^
fs/btrfs/disk-io.c:2249:14: error: incomplete definition of type 'struct key'
up_read(&key->sem);
~~~^
include/linux/key.h:33:8: note: forward declaration of 'struct key'
struct key;
^
1 warning and 7 errors generated.
vim +/request_key +2227 fs/btrfs/disk-io.c
2187
2188 static int btrfs_init_csum_hash(struct btrfs_fs_info *fs_info, u16 csum_type)
2189 {
2190 struct crypto_shash *csum_shash;
2191 const char *csum_driver = btrfs_super_csum_driver(csum_type);
2192 struct key *key;
2193 const struct user_key_payload *ukp;
2194 int err = 0;
2195
2196 csum_shash = crypto_alloc_shash(csum_driver, 0, 0);
2197
2198 if (IS_ERR(csum_shash)) {
2199 btrfs_err(fs_info, "error allocating %s hash for checksum",
2200 csum_driver);
2201 return PTR_ERR(csum_shash);
2202 }
2203
2204 fs_info->csum_shash = csum_shash;
2205
2206 /*
2207 * if we're not doing authentication, we're done by now. Still we have
2208 * to validate the possible combinations of BTRFS_MOUNT_AUTH_KEY and
2209 * keyed hashes.
2210 */
2211 if (csum_type == BTRFS_CSUM_TYPE_HMAC_SHA256 &&
2212 !btrfs_test_opt(fs_info, AUTH_KEY)) {
2213 crypto_free_shash(fs_info->csum_shash);
2214 return -EINVAL;
2215 } else if (btrfs_test_opt(fs_info, AUTH_KEY)
2216 && csum_type != BTRFS_CSUM_TYPE_HMAC_SHA256) {
2217 crypto_free_shash(fs_info->csum_shash);
2218 return -EINVAL;
2219 } else if (!btrfs_test_opt(fs_info, AUTH_KEY)) {
2220 /*
2221 * This is the normal case, if noone want's authentication and
2222 * doesn't have a keyed hash, we're done.
2223 */
2224 return 0;
2225 }
2226
> 2227 key = request_key(&key_type_logon, fs_info->auth_key_name, NULL);
2228 if (IS_ERR(key))
2229 return PTR_ERR(key);
2230
> 2231 down_read(&key->sem);
2232
> 2233 ukp = user_key_payload_locked(key);
2234 if (!ukp) {
2235 btrfs_err(fs_info, "");
2236 err = -EKEYREVOKED;
2237 goto out;
2238 }
2239
> 2240 err = crypto_shash_setkey(fs_info->csum_shash, ukp->data, ukp->datalen);
2241 if (err)
2242 btrfs_err(fs_info, "error setting key %s for verification",
2243 fs_info->auth_key_name);
2244
2245 out:
2246 if (err)
2247 crypto_free_shash(fs_info->csum_shash);
2248
2249 up_read(&key->sem);
2250 key_put(key);
2251
2252 return err;
2253 }
2254
---
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: 32638 bytes --]
next prev parent reply other threads:[~2020-04-29 7:24 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 10:58 [PATCH v2 0/2] Add file-system authentication to BTRFS Johannes Thumshirn
2020-04-28 10:58 ` [PATCH v2 1/2] btrfs: add authentication support Johannes Thumshirn
2020-04-29 7:23 ` kbuild test robot [this message]
2020-04-29 11:46 ` Johannes Thumshirn
2020-05-01 5:39 ` Eric Biggers
2020-05-01 6:30 ` Eric Biggers
2020-05-04 8:38 ` Johannes Thumshirn
2020-05-05 22:33 ` David Sterba
2020-05-06 8:10 ` Johannes Thumshirn
2020-05-04 10:09 ` Johannes Thumshirn
2020-05-04 20:59 ` Eric Biggers
2020-05-05 8:11 ` Johannes Thumshirn
2020-05-05 9:26 ` Qu Wenruo
2020-05-05 9:59 ` Qu Wenruo
2020-05-05 22:32 ` David Sterba
2020-05-05 23:55 ` Qu Wenruo
2020-05-06 20:40 ` btree [was Re: [PATCH v2 1/2] btrfs: add authentication support] Goffredo Baroncelli
2020-05-06 22:57 ` Qu Wenruo
2020-05-05 22:19 ` [PATCH v2 1/2] btrfs: add authentication support David Sterba
2020-05-05 22:37 ` Eric Biggers
2020-05-06 8:30 ` Johannes Thumshirn
2020-05-05 22:14 ` David Sterba
2020-05-05 22:31 ` Eric Biggers
2020-05-05 22:46 ` David Sterba
2020-05-05 23:31 ` Eric Biggers
2020-05-06 0:29 ` David Sterba
2020-05-06 0:44 ` Eric Biggers
2020-05-04 21:37 ` Richard Weinberger
2020-05-05 7:46 ` Johannes Thumshirn
2020-05-05 11:56 ` Richard Weinberger
2020-05-04 21:59 ` Richard Weinberger
2020-05-05 7:55 ` Johannes Thumshirn
2020-05-05 12:36 ` Jeff Mahoney
2020-05-05 12:39 ` Qu Wenruo
2020-05-05 12:41 ` Jeff Mahoney
2020-05-05 12:48 ` Qu Wenruo
2020-05-05 23:02 ` David Sterba
2020-05-06 21:24 ` Goffredo Baroncelli
2020-05-05 23:00 ` David Sterba
2020-05-05 9:43 ` Qu Wenruo
2020-05-06 20:59 ` Goffredo Baroncelli
2020-04-28 10:58 ` [PATCH v2 2/2] btrfs: rename btrfs_parse_device_options back to btrfs_parse_early_options Johannes Thumshirn
2020-05-01 6:03 ` [PATCH v2 0/2] Add file-system authentication to BTRFS Eric Biggers
2020-05-04 8:39 ` Johannes Thumshirn
2020-05-05 23:16 ` David Sterba
2020-05-01 21:26 ` Jason A. Donenfeld
2020-05-05 23:38 ` David Sterba
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=202004291518.v6EvXXNe%lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=dsterba@suse.cz \
--cc=ebiggers@google.com \
--cc=johannes.thumshirn@wdc.com \
--cc=jth@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=richard@nod.at \
/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).