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@xxxxxxxxx> 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@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip