* [openeuler:OLK-6.6 1474/1474] security/integrity/ima/ima_tpm.c:19:6: warning: no previous prototype for 'ima_pcrread'
@ 2024-11-16 18:08 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-11-16 18:08 UTC (permalink / raw)
To: kernel, GONG Ruiqi; +Cc: oe-kbuild-all
Hi GONG,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 7c547c6bbe6b6a9cedf63d7cdadb2529404df633
commit: 40151ef24c1a0f35c5e0442834eb776877e66683 [1474/1474] ima: rot: Prepare TPM as an RoT
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20241117/202411170203.cd5LERnD-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241117/202411170203.cd5LERnD-lkp@intel.com/reproduce)
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/202411170203.cd5LERnD-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> security/integrity/ima/ima_tpm.c:19:6: warning: no previous prototype for 'ima_pcrread' [-Wmissing-prototypes]
19 | void ima_pcrread(u32 idx, struct tpm_digest *d)
| ^~~~~~~~~~~
security/integrity/ima/ima_tpm.c:28:5: warning: no previous prototype for 'ima_pcr_extend' [-Wmissing-prototypes]
28 | int ima_pcr_extend(struct tpm_digest *digests_arg, int pcr)
| ^~~~~~~~~~~~~~
>> security/integrity/ima/ima_tpm.c:41:5: warning: no previous prototype for 'ima_tpm_init' [-Wmissing-prototypes]
41 | int ima_tpm_init(struct ima_rot *rot)
| ^~~~~~~~~~~~
>> security/integrity/ima/ima_tpm.c:53:5: warning: no previous prototype for 'ima_tpm_extend' [-Wmissing-prototypes]
53 | int ima_tpm_extend(struct tpm_digest *digests_arg, const void *args)
| ^~~~~~~~~~~~~~
>> security/integrity/ima/ima_tpm.c:60:5: warning: no previous prototype for 'ima_tpm_calc_boot_aggregate' [-Wmissing-prototypes]
60 | int ima_tpm_calc_boot_aggregate(struct ima_digest_data *hash)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/ima_pcrread +19 security/integrity/ima/ima_tpm.c
18
> 19 void ima_pcrread(u32 idx, struct tpm_digest *d)
20 {
21 if (!ima_tpm_chip)
22 return;
23
24 if (tpm_pcr_read(ima_tpm_chip, idx, d) != 0)
25 pr_err("Error Communicating to TPM chip\n");
26 }
27
28 int ima_pcr_extend(struct tpm_digest *digests_arg, int pcr)
29 {
30 int result = 0;
31
32 if (!ima_tpm_chip)
33 return result;
34
35 result = tpm_pcr_extend(ima_tpm_chip, pcr, digests_arg);
36 if (result != 0)
37 pr_err("Error Communicating to TPM chip, result: %d\n", result);
38 return result;
39 }
40
> 41 int ima_tpm_init(struct ima_rot *rot)
42 {
43 ima_tpm_chip = tpm_default_chip();
44 if (!ima_tpm_chip)
45 return -ENODEV;
46
47 rot->nr_allocated_banks = ima_tpm_chip->nr_allocated_banks;
48 rot->allocated_banks = ima_tpm_chip->allocated_banks;
49
50 return 0;
51 }
52
> 53 int ima_tpm_extend(struct tpm_digest *digests_arg, const void *args)
54 {
55 const int pcr = *(const int *)args;
56
57 return ima_pcr_extend(digests_arg, pcr);
58 }
59
> 60 int ima_tpm_calc_boot_aggregate(struct ima_digest_data *hash)
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-11-16 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-16 18:08 [openeuler:OLK-6.6 1474/1474] security/integrity/ima/ima_tpm.c:19:6: warning: no previous prototype for 'ima_pcrread' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.