Hi Jarkko,

kernel test robot noticed the following build errors:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on char-misc/char-misc-next char-misc/char-misc-linus 
linus/master v6.12-rc6 next-20241106]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Jarkko-Sakkinen/tpm-Opt-in-in-disable-PCR-integrity-protection/20241107-175515
base:   char-misc/char-misc-testing
patch link:    
https://lore.kernel.org/r/20241107095138.78209-1-jarkko%40kernel.org
patch subject: [PATCH v2] tpm: Opt-in in disable PCR integrity protection
config: x86_64-rhel-8.3 
(https://download.01.org/0day-ci/archive/20241107/202411072138.bgoil36o-...@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20241107/202411072138.bgoil36o-...@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 <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202411072138.bgoil36o-...@intel.com/

All errors (new ones prefixed by >>):

   drivers/char/tpm/tpm2-cmd.c: In function 'tpm2_pcr_extend':
>> drivers/char/tpm/tpm2-cmd.c:253:17: error: too few arguments to function 
>> 'tpm_buf_append_name'
     253 |                 tpm_buf_append_name(chip, &buf, pcr_idx);
         |                 ^~~~~~~~~~~~~~~~~~~
   In file included from drivers/char/tpm/tpm.h:27,
                    from drivers/char/tpm/tpm2-cmd.c:14:
   include/linux/tpm.h:504:6: note: declared here
     504 | void tpm_buf_append_name(struct tpm_chip *chip, struct tpm_buf *buf,
         |      ^~~~~~~~~~~~~~~~~~~


vim +/tpm_buf_append_name +253 drivers/char/tpm/tpm2-cmd.c

   222  
   223  /**
   224   * tpm2_pcr_extend() - extend a PCR value
   225   *
   226   * @chip:       TPM chip to use.
   227   * @pcr_idx:    index of the PCR.
   228   * @digests:    list of pcr banks and corresponding digest values to 
extend.
   229   *
   230   * Return: Same as with tpm_transmit_cmd.
   231   */
   232  int tpm2_pcr_extend(struct tpm_chip *chip, u32 pcr_idx,
   233                      struct tpm_digest *digests)
   234  {
   235          struct tpm_buf buf;
   236          int rc;
   237          int i;
   238  
   239          if (!disable_pcr_integrity_protection) {
   240                  rc = tpm2_start_auth_session(chip);
   241                  if (rc)
   242                          return rc;
   243          }
   244  
   245          rc = tpm_buf_init(&buf, TPM2_ST_SESSIONS, TPM2_CC_PCR_EXTEND);
   246          if (rc) {
   247                  if (!disable_pcr_integrity_protection)
   248                          tpm2_end_auth_session(chip);
   249                  return rc;
   250          }
   251  
   252          if (!disable_pcr_integrity_protection) {
 > 253                  tpm_buf_append_name(chip, &buf, pcr_idx);
   254                  tpm_buf_append_hmac_session(chip, &buf, 0, NULL, 0);
   255          } else {
   256                  tpm_buf_append_handle(chip, &buf, pcr_idx);
   257                  tpm_buf_append_auth(chip, &buf, 0, NULL, 0);
   258          }
   259  
   260          tpm_buf_append_u32(&buf, chip->nr_allocated_banks);
   261  
   262          for (i = 0; i < chip->nr_allocated_banks; i++) {
   263                  tpm_buf_append_u16(&buf, digests[i].alg_id);
   264                  tpm_buf_append(&buf, (const unsigned char 
*)&digests[i].digest,
   265                                 chip->allocated_banks[i].digest_size);
   266          }
   267  
   268          if (!disable_pcr_integrity_protection)
   269                  tpm_buf_fill_hmac_session(chip, &buf);
   270          rc = tpm_transmit_cmd(chip, &buf, 0, "attempting extend a PCR 
value");
   271          if (!disable_pcr_integrity_protection)
   272                  rc = tpm_buf_check_hmac_response(chip, &buf, rc);
   273  
   274          tpm_buf_destroy(&buf);
   275  
   276          return rc;
   277  }
   278  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to