From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org, GONG Ruiqi <gongruiqi1@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-6.6 1474/1474] security/integrity/ima/ima_tpm.c:19:6: warning: no previous prototype for 'ima_pcrread'
Date: Sun, 17 Nov 2024 02:08:05 +0800 [thread overview]
Message-ID: <202411170203.cd5LERnD-lkp@intel.com> (raw)
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
reply other threads:[~2024-11-16 18:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202411170203.cd5LERnD-lkp@intel.com \
--to=lkp@intel.com \
--cc=gongruiqi1@huawei.com \
--cc=kernel@openeuler.org \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.