[openeuler:OLK-6.6 2329/2329] security/integrity/ima/ima_virtcca.c:30:5: warning: no previous prototype for 'ima_virtcca_init'

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: ecedb4219f373697a260948e7bfe781c40318682 commit: 24ac42fb86c6acfcb89b76d3b2fd6fba9bfd89de [2329/2329] ima: rot: Adapt VirtCCA into Rot config: arm64-randconfig-003-20250529 (https://download.01.org/0day-ci/archive/20250528/202505282351.rMVzfHVV-lkp@i...) compiler: aarch64-linux-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250528/202505282351.rMVzfHVV-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/202505282351.rMVzfHVV-lkp@intel.com/ All warnings (new ones prefixed by >>):
security/integrity/ima/ima_virtcca.c:30:5: warning: no previous prototype for 'ima_virtcca_init' [-Wmissing-prototypes] int ima_virtcca_init(struct ima_rot *rot) ^~~~~~~~~~~~~~~~ security/integrity/ima/ima_virtcca.c:59:5: warning: no previous prototype for 'ima_calc_virtcca_boot_aggregate' [-Wmissing-prototypes] int ima_calc_virtcca_boot_aggregate(struct ima_digest_data *hash) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ security/integrity/ima/ima_virtcca.c:81:5: warning: no previous prototype for 'ima_virtcca_extend' [-Wmissing-prototypes] int ima_virtcca_extend(struct tpm_digest *digests_arg, const void *args) ^~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_KEY_PARSER Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] && ASYMMETRIC_PUBLIC_KEY_SUBTYPE [=n] Selected by [y]: - PGP_PRELOAD [=y] && CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] WARNING: unmet direct dependencies detected for RESCTRL_FS Depends on [n]: MISC_FILESYSTEMS [=n] && ARCH_HAS_CPU_RESCTRL [=y] Selected by [y]: - ARM64_MPAM [=y] vim +/ima_virtcca_init +30 security/integrity/ima/ima_virtcca.c 29
30 int ima_virtcca_init(struct ima_rot *rot) 31 { 32 int rc; 33 34 if (!is_virtcca_cvm_world() || tsi_get_version() == SMCCC_RET_NOT_SUPPORTED) 35 return -ENODEV; 36 37 rc = ima_virtcca_init_algo(); 38 if (rc) 39 return rc; 40 41 if (virtcca_algo != ima_hash_algo) { 42 pr_info("VirtCCA's algo (%s) is different from ima_hash_algo (%s)\n", 43 hash_algo_name[virtcca_algo], hash_algo_name[ima_hash_algo]); 44 45 rot->allocated_banks = kcalloc(1, sizeof(*rot->allocated_banks), GFP_KERNEL); 46 if (!rot->allocated_banks) 47 return -ENOMEM; 48 49 rot->nr_allocated_banks = 1; 50 rot->allocated_banks[0].alg_id = (virtcca_algo == HASH_ALGO_SHA512) ? 51 TPM_ALG_SHA512 : TPM_ALG_SHA256; 52 rot->allocated_banks[0].digest_size = hash_digest_size[virtcca_algo]; 53 rot->allocated_banks[0].crypto_id = virtcca_algo; 54 } 55 56 return 0; 57 } 58 59 int ima_calc_virtcca_boot_aggregate(struct ima_digest_data *hash) 60 { 61 unsigned long result; 62 struct virtcca_cvm_measurement cm = { 0 }; 63 64 hash->algo = virtcca_algo; 65 hash->length = hash_digest_size[virtcca_algo]; 66 67 /* Read the measurement result of RIM as the boot aggregate */ 68 cm.index = RIM_MEASUREMENT_SLOT; 69 70 result = tsi_measurement_read(&cm); 71 if (result != TSI_SUCCESS) { 72 pr_err("Error reading cvm measurement 0 for boot aggregate\n"); 73 return -EFAULT; 74 } 75 76 memcpy(hash->digest, cm.value, hash->length); 77 78 return 0; 79 } 80 81 int ima_virtcca_extend(struct tpm_digest *digests_arg, const void *args)
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot