Hi Ahmad,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on 2734d6c1b1a089fb593ef6a23d4b70903526fe0c]
url:
https://github.com/0day-ci/linux/commits/Ahmad-Fatoum/keys-introduce-key_...
base: 2734d6c1b1a089fb593ef6a23d4b70903526fe0c
config: alpha-randconfig-r011-20210722 (attached as .config)
compiler: alpha-linux-gcc (GCC) 10.3.0
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
#
https://github.com/0day-ci/linux/commit/1f09360d0a6ad6d739b7d5195e8c71516...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Ahmad-Fatoum/keys-introduce-key_extract_material-helper/20210722-172029
git checkout 1f09360d0a6ad6d739b7d5195e8c71516d0c3381
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
fs/ubifs/auth.c: In function 'ubifs_init_authentication':
> fs/ubifs/auth.c:285:6: warning: ignoring return value of
'IS_ERR' declared with attribute 'warn_unused_result' [-Wunused-result]
285 | if (IS_ERR(keyring_key) && IS_REACHABLE(CONFIG_TRUSTED_KEYS))
| ^~~~~~~~~~~~~~~~~~~
vim +285 fs/ubifs/auth.c
251
252 /**
253 * ubifs_init_authentication - initialize UBIFS authentication support
254 * @c: UBIFS file-system description object
255 *
256 * This function returns 0 for success or a negative error code otherwise.
257 */
258 int ubifs_init_authentication(struct ubifs_info *c)
259 {
260 struct key *keyring_key;
261 int err;
262 unsigned int len;
263 char hmac_name[CRYPTO_MAX_ALG_NAME];
264 const void *key_material;
265
266 if (!c->auth_hash_name) {
267 ubifs_err(c, "authentication hash name needed with authentication");
268 return -EINVAL;
269 }
270
271 c->auth_hash_algo = match_string(hash_algo_name, HASH_ALGO__LAST,
272 c->auth_hash_name);
273 if ((int)c->auth_hash_algo < 0) {
274 ubifs_err(c, "Unknown hash algo %s specified",
275 c->auth_hash_name);
276 return -EINVAL;
277 }
278
279 snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)",
280 c->auth_hash_name);
281
282 keyring_key = request_key(&key_type_logon, c->auth_key_name, NULL);
283 if (IS_ERR(keyring_key) && IS_REACHABLE(CONFIG_ENCRYPTED_KEYS))
284 keyring_key = request_key(&key_type_encrypted, c->auth_key_name, NULL);
285 if (IS_ERR(keyring_key) &&
IS_REACHABLE(CONFIG_TRUSTED_KEYS))
286 keyring_key =
request_key(&key_type_trusted, c->auth_key_name, NULL);
287
288 if (IS_ERR(keyring_key)) {
289 ubifs_err(c, "Failed to request key: %ld",
290 PTR_ERR(keyring_key));
291 return PTR_ERR(keyring_key);
292 }
293
294 down_read(&keyring_key->sem);
295
296 key_material = key_extract_material(keyring_key, &len);
297 err = PTR_ERR_OR_ZERO(key_material);
298 if (err < 0)
299 goto out;
300
301 c->hash_tfm = crypto_alloc_shash(c->auth_hash_name, 0, 0);
302 if (IS_ERR(c->hash_tfm)) {
303 err = PTR_ERR(c->hash_tfm);
304 ubifs_err(c, "Can not allocate %s: %d",
305 c->auth_hash_name, err);
306 goto out;
307 }
308
309 c->hash_len = crypto_shash_digestsize(c->hash_tfm);
310 if (c->hash_len > UBIFS_HASH_ARR_SZ) {
311 ubifs_err(c, "hash %s is bigger than maximum allowed hash size (%d >
%d)",
312 c->auth_hash_name, c->hash_len, UBIFS_HASH_ARR_SZ);
313 err = -EINVAL;
314 goto out_free_hash;
315 }
316
317 c->hmac_tfm = crypto_alloc_shash(hmac_name, 0, 0);
318 if (IS_ERR(c->hmac_tfm)) {
319 err = PTR_ERR(c->hmac_tfm);
320 ubifs_err(c, "Can not allocate %s: %d", hmac_name, err);
321 goto out_free_hash;
322 }
323
324 c->hmac_desc_len = crypto_shash_digestsize(c->hmac_tfm);
325 if (c->hmac_desc_len > UBIFS_HMAC_ARR_SZ) {
326 ubifs_err(c, "hmac %s is bigger than maximum allowed hmac size (%d >
%d)",
327 hmac_name, c->hmac_desc_len, UBIFS_HMAC_ARR_SZ);
328 err = -EINVAL;
329 goto out_free_hmac;
330 }
331
332 err = crypto_shash_setkey(c->hmac_tfm, key_material, len);
333 if (err)
334 goto out_free_hmac;
335
336 c->authenticated = true;
337
338 c->log_hash = ubifs_hash_get_desc(c);
339 if (IS_ERR(c->log_hash)) {
340 err = PTR_ERR(c->log_hash);
341 goto out_free_hmac;
342 }
343
344 err = 0;
345
346 out_free_hmac:
347 if (err)
348 crypto_free_shash(c->hmac_tfm);
349 out_free_hash:
350 if (err)
351 crypto_free_shash(c->hash_tfm);
352 out:
353 up_read(&keyring_key->sem);
354 key_put(keyring_key);
355
356 return err;
357 }
358
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org