Hi Zhou,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 5a1d9701155c6908c76c68951170f10279685143 commit: e94df9b790f7ed9025c9321f16a77044f66b14a5 [19146/30000] ima: Add macros to isolate the IMA digest list config: x86_64-buildonly-randconfig-004-20240913 (https://download.01.org/0day-ci/archive/20240913/202409131250.EMUg1KnI-lkp@i...) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240913/202409131250.EMUg1KnI-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/202409131250.EMUg1KnI-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:16: warning: declaration of 'struct ima_digest' will not be visible outside of this function [-Wvisibility] 381 | struct ima_digest *found_digest) | ^
security/integrity/ima/ima_main.c:440:29: error: too few arguments to function call, expected 8, have 7
433 | rc = ima_appraise_measurement(func, iint, file, | ~~~~~~~~~~~~~~~~~~~~~~~~ 434 | pathname, xattr_value, 435 | #ifdef CONFIG_IMA_DIGEST_LIST 436 | xattr_len, modsig, 437 | ima_digest_allow(found_digest, 438 | IMA_APPRAISE)); 439 | #else 440 | xattr_len, modsig); | ^ security/integrity/ima/ima.h:373:19: note: 'ima_appraise_measurement' declared here 373 | static inline int ima_appraise_measurement(enum ima_hooks func, | ^ ~~~~~~~~~~~~~~~~~~~~ 374 | struct integrity_iint_cache *iint, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 375 | struct file *file, | ~~~~~~~~~~~~~~~~~~ 376 | const unsigned char *filename, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 377 | struct evm_ima_xattr_data *xattr_value, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 378 | int xattr_len, | ~~~~~~~~~~~~~~ 379 | #ifndef CONFIG_IMA_DIGEST_LIST | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 380 | const struct modsig *modsig, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 381 | struct ima_digest *found_digest) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated.
vim +440 security/integrity/ima/ima_main.c
427 428 if (rc == 0 && (action & IMA_APPRAISE_SUBMASK)) { 429 rc = ima_check_blacklist(iint, modsig, pcr); 430 if (rc != -EPERM) { 431 inode_lock(inode); 432 433 rc = ima_appraise_measurement(func, iint, file, 434 pathname, xattr_value, 435 #ifdef CONFIG_IMA_DIGEST_LIST 436 xattr_len, modsig, 437 ima_digest_allow(found_digest, 438 IMA_APPRAISE)); 439 #else
440 xattr_len, modsig);
441 #endif 442 inode_unlock(inode); 443 } 444 if (!rc) 445 rc = mmap_violation_check(func, file, &pathbuf, 446 &pathname, filename); 447 } 448 if (action & IMA_AUDIT) 449 ima_audit_measurement(iint, pathname); 450 451 if ((file->f_flags & O_DIRECT) && (iint->flags & IMA_PERMIT_DIRECTIO)) 452 rc = 0; 453 out_locked: 454 if ((mask & MAY_WRITE) && test_bit(IMA_DIGSIG, &iint->atomic_flags) && 455 !(iint->flags & IMA_NEW_FILE)) 456 rc = -EACCES; 457 mutex_unlock(&iint->mutex); 458 kfree(xattr_value); 459 ima_free_modsig(modsig); 460 out: 461 if (pathbuf) 462 __putname(pathbuf); 463 if (must_appraise) { 464 if (rc && (ima_appraise & IMA_APPRAISE_ENFORCE)) 465 return -EACCES; 466 if (file->f_mode & FMODE_WRITE) 467 set_bit(IMA_UPDATE_XATTR, &iint->atomic_flags); 468 } 469 return 0; 470 } 471