tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 7c547c6bbe6b6a9cedf63d7cdadb2529404df633 commit: b89997c5e3ffa58c43c4cb3547eb0c11b75d0634 [1474/1474] IMA support script execution check config: x86_64-buildonly-randconfig-001-20241117 (https://download.01.org/0day-ci/archive/20241117/202411171510.9dZc68aH-lkp@i...) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411171510.9dZc68aH-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/202411171510.9dZc68aH-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from security/security.c:14: In file included from include/linux/bpf.h:21: In file included from include/linux/kallsyms.h:13: In file included from include/linux/mm.h:2247: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~
security/security.c:1071:9: error: call to undeclared function 'ima_bprm_creds_for_exec'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1071 | return ima_bprm_creds_for_exec(bprm); | ^ security/security.c:1071:9: note: did you mean 'security_bprm_creds_for_exec'? security/security.c:1064:5: note: 'security_bprm_creds_for_exec' declared here 1064 | int security_bprm_creds_for_exec(struct linux_binprm *bprm) | ^ 1065 | { 1066 | int ret; 1067 | 1068 | ret = call_int_hook(bprm_creds_for_exec, 0, bprm); 1069 | if (ret) 1070 | return ret; 1071 | return ima_bprm_creds_for_exec(bprm); | ~~~~~~~~~~~~~~~~~~~~~~~ | security_bprm_creds_for_exec 1 warning and 1 error generated.
vim +/ima_bprm_creds_for_exec +1071 security/security.c
1043 1044 /** 1045 * security_bprm_creds_for_exec() - Prepare the credentials for exec() 1046 * @bprm: binary program information 1047 * 1048 * If the setup in prepare_exec_creds did not setup @bprm->cred->security 1049 * properly for executing @bprm->file, update the LSM's portion of 1050 * @bprm->cred->security to be what commit_creds needs to install for the new 1051 * program. This hook may also optionally check permissions (e.g. for 1052 * transitions between security domains). The hook must set @bprm->secureexec 1053 * to 1 if AT_SECURE should be set to request libc enable secure mode. @bprm 1054 * contains the linux_binprm structure. 1055 * 1056 * If execveat(2) is called with the AT_CHECK flag, bprm->is_check is set. The 1057 * result must be the same as without this flag even if the execution will 1058 * never really happen and @bprm will always be dropped. 1059 * 1060 * This hook must not change current->cred, only @bprm->cred. 1061 * 1062 * Return: Returns 0 if the hook is successful and permission is granted. 1063 */ 1064 int security_bprm_creds_for_exec(struct linux_binprm *bprm) 1065 { 1066 int ret; 1067 1068 ret = call_int_hook(bprm_creds_for_exec, 0, bprm); 1069 if (ret) 1070 return ret;
1071 return ima_bprm_creds_for_exec(bprm);
1072 } 1073