tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 412556141b3c12f2f160acc3a09a40c937837ee3 commit: e94df9b790f7ed9025c9321f16a77044f66b14a5 [18534/30000] ima: Add macros to isolate the IMA digest list config: x86_64-buildonly-randconfig-006-20241027 (https://download.01.org/0day-ci/archive/20241027/202410271136.UhOv1msf-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241027/202410271136.UhOv1msf-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202410271136.UhOv1msf-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from security/integrity/ima/ima_main.c:30: security/integrity/ima/ima.h:381:51: warning: 'struct ima_digest' declared inside parameter list will not be visible outside of this definition or declaration 381 | struct ima_digest *found_digest) | ^~~~~~~~~~ security/integrity/ima/ima_main.c: In function 'process_measurement':
security/integrity/ima/ima_main.c:433:30: error: too few arguments to function 'ima_appraise_measurement'
433 | rc = ima_appraise_measurement(func, iint, file, | ^~~~~~~~~~~~~~~~~~~~~~~~ security/integrity/ima/ima.h:373:19: note: declared here 373 | static inline int ima_appraise_measurement(enum ima_hooks func, | ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/ima_appraise_measurement +433 security/integrity/ima/ima_main.c
31604143977fc2b Roberto Sassu 2021-03-03 427 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 428 if (rc == 0 && (action & IMA_APPRAISE_SUBMASK)) { 8b4670bcc857ed9 Zhang Tianxing 2021-12-29 429 rc = ima_check_blacklist(iint, modsig, pcr); 273df864cf7466f Nayna Jain 2019-10-30 430 if (rc != -EPERM) { 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 431 inode_lock(inode); e94df9b790f7ed9 Zhou Shuiqing 2023-09-06 432 273df864cf7466f Nayna Jain 2019-10-30 @433 rc = ima_appraise_measurement(func, iint, file, 273df864cf7466f Nayna Jain 2019-10-30 434 pathname, xattr_value, e94df9b790f7ed9 Zhou Shuiqing 2023-09-06 435 #ifdef CONFIG_IMA_DIGEST_LIST a44c2ae6cac55bd Roberto Sassu 2021-03-03 436 xattr_len, modsig, a44c2ae6cac55bd Roberto Sassu 2021-03-03 437 ima_digest_allow(found_digest, a44c2ae6cac55bd Roberto Sassu 2021-03-03 438 IMA_APPRAISE)); e94df9b790f7ed9 Zhou Shuiqing 2023-09-06 439 #else e94df9b790f7ed9 Zhou Shuiqing 2023-09-06 440 xattr_len, modsig); e94df9b790f7ed9 Zhou Shuiqing 2023-09-06 441 #endif 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 442 inode_unlock(inode); 273df864cf7466f Nayna Jain 2019-10-30 443 } 2cd4737bc850225 Mimi Zohar 2019-04-30 444 if (!rc) 2cd4737bc850225 Mimi Zohar 2019-04-30 445 rc = mmap_violation_check(func, file, &pathbuf, 2cd4737bc850225 Mimi Zohar 2019-04-30 446 &pathname, filename); 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 447 } e7c568e0fd0cf6d Peter Moody 2012-06-14 448 if (action & IMA_AUDIT) ea1046d4c57ee6e Dmitry Kasatkin 2012-09-04 449 ima_audit_measurement(iint, pathname); f7a859ff7395c0f Roberto Sassu 2014-09-12 450 f3cc6b25dcc5616 Mimi Zohar 2017-06-17 451 if ((file->f_flags & O_DIRECT) && (iint->flags & IMA_PERMIT_DIRECTIO)) f3cc6b25dcc5616 Mimi Zohar 2017-06-17 452 rc = 0; 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 453 out_locked: 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 454 if ((mask & MAY_WRITE) && test_bit(IMA_DIGSIG, &iint->atomic_flags) && 05d1a717ec0430c Mimi Zohar 2016-02-29 455 !(iint->flags & IMA_NEW_FILE)) a175b8bb29ebbad Dmitry Kasatkin 2012-09-27 456 rc = -EACCES; 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 457 mutex_unlock(&iint->mutex); f7a859ff7395c0f Roberto Sassu 2014-09-12 458 kfree(xattr_value); 39b07096364a42c Thiago Jung Bauermann 2019-06-27 459 ima_free_modsig(modsig); 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 460 out: 456f5fd3f6017f1 Dmitry Kasatkin 2014-10-01 461 if (pathbuf) 456f5fd3f6017f1 Dmitry Kasatkin 2014-10-01 462 __putname(pathbuf); 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 463 if (must_appraise) { 581fd05ad98600a Zhang Tianxing 2021-12-29 464 if (rc && (ima_appraise & IMA_APPRAISE_ENFORCE)) 750943a30714b7e Dmitry Kasatkin 2012-09-27 465 return -EACCES; 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 466 if (file->f_mode & FMODE_WRITE) 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 467 set_bit(IMA_UPDATE_XATTR, &iint->atomic_flags); 0d73a55208e94fc Dmitry Kasatkin 2017-12-05 468 } 750943a30714b7e Dmitry Kasatkin 2012-09-27 469 return 0; 3323eec921efd81 Mimi Zohar 2009-02-04 470 } 3323eec921efd81 Mimi Zohar 2009-02-04 471
:::::: The code at line 433 was first introduced by commit :::::: 273df864cf7466fb170b8dcc1abd672cd08ad8d3 ima: Check against blacklisted hashes for files with modsig
:::::: TO: Nayna Jain nayna@linux.ibm.com :::::: CC: Michael Ellerman mpe@ellerman.id.au