linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: kbuild-all@lists.01.org, linux-integrity@vger.kernel.org,
	jarkko.sakkinen@linux.intel.com, linux-kernel@vger.kernel.org,
	linux-security-module@vger.kernel.org,
	Stefan Berger <stefanb@linux.ibm.com>
Subject: Re: [PATCH v3] tpm: Add support for event log pointer found in TPM2 ACPI table
Date: Wed, 1 Apr 2020 13:07:46 +0800	[thread overview]
Message-ID: <202004011357.8dZN6ayM%lkp@intel.com> (raw)
In-Reply-To: <20200331215100.883860-1-stefanb@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 3985 bytes --]

Hi Stefan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on v5.6 next-20200331]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Stefan-Berger/tpm-Add-support-for-event-log-pointer-found-in-TPM2-ACPI-table/20200401-055303
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 5caf6102e32ead7ed5d21b5309c1a4a7d70e6a9f
config: x86_64-randconfig-s1-20200401 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-6) 7.4.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/char/tpm/eventlog/acpi.c: In function 'tpm_read_log_acpi':
>> drivers/char/tpm/eventlog/acpi.c:70:12: error: 'struct acpi_table_tpm2' has no member named 'log_area_minimum_length'
      len = tbl->log_area_minimum_length;
               ^~
>> drivers/char/tpm/eventlog/acpi.c:71:14: error: 'struct acpi_table_tpm2' has no member named 'log_area_start_address'
      start = tbl->log_area_start_address;
                 ^~

vim +70 drivers/char/tpm/eventlog/acpi.c

    43	
    44	/* read binary bios log */
    45	int tpm_read_log_acpi(struct tpm_chip *chip)
    46	{
    47		struct acpi_tcpa *buff;
    48		acpi_status status;
    49		void __iomem *virt;
    50		u64 len, start;
    51		struct tpm_bios_log *log;
    52		struct acpi_table_tpm2 *tbl;
    53		int format;
    54	
    55		log = &chip->log;
    56	
    57		/* Unfortuntely ACPI does not associate the event log with a specific
    58		 * TPM, like PPI. Thus all ACPI TPMs will read the same log.
    59		 */
    60		if (!chip->acpi_dev_handle)
    61			return -ENODEV;
    62	
    63		if (chip->flags & TPM_CHIP_FLAG_TPM2) {
    64			status = acpi_get_table("TPM2", 1,
    65						(struct acpi_table_header **)&tbl);
    66			if (ACPI_FAILURE(status))
    67				return -ENODEV;
    68			if (tbl->header.length < sizeof(*tbl))
    69				return -ENODEV;
  > 70			len = tbl->log_area_minimum_length;
  > 71			start = tbl->log_area_start_address;
    72			if (!start || !len)
    73				return -ENODEV;
    74			format = EFI_TCG2_EVENT_LOG_FORMAT_TCG_2;
    75		} else {
    76			/* Find TCPA entry in RSDT (ACPI_LOGICAL_ADDRESSING) */
    77			status = acpi_get_table(ACPI_SIG_TCPA, 1,
    78						(struct acpi_table_header **)&buff);
    79	
    80			if (ACPI_FAILURE(status))
    81				return -ENODEV;
    82	
    83			switch (buff->platform_class) {
    84			case BIOS_SERVER:
    85				len = buff->server.log_max_len;
    86				start = buff->server.log_start_addr;
    87				break;
    88			case BIOS_CLIENT:
    89			default:
    90				len = buff->client.log_max_len;
    91				start = buff->client.log_start_addr;
    92				break;
    93			}
    94			format = EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2;
    95		}
    96		if (!len) {
    97			dev_warn(&chip->dev, "%s: TCPA log area empty\n", __func__);
    98			return -EIO;
    99		}
   100	
   101		/* malloc EventLog space */
   102		log->bios_event_log = kmalloc(len, GFP_KERNEL);
   103		if (!log->bios_event_log)
   104			return -ENOMEM;
   105	
   106		log->bios_event_log_end = log->bios_event_log + len;
   107	
   108		virt = acpi_os_map_iomem(start, len);
   109		if (!virt)
   110			goto err;
   111	
   112		memcpy_fromio(log->bios_event_log, virt, len);
   113	
   114		acpi_os_unmap_iomem(virt, len);
   115		return format;
   116	
   117	err:
   118		kfree(log->bios_event_log);
   119		log->bios_event_log = NULL;
   120		return -EIO;
   121	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38638 bytes --]

  reply	other threads:[~2020-04-01  5:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 21:51 [PATCH v3] tpm: Add support for event log pointer found in TPM2 ACPI table Stefan Berger
2020-04-01  5:07 ` kbuild test robot [this message]
2020-04-01  8:49 ` Jarkko Sakkinen
2020-04-01 12:20   ` Stefan Berger
2020-04-02 19:46     ` Jarkko Sakkinen

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=202004011357.8dZN6ayM%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=stefanb@linux.ibm.com \
    --cc=stefanb@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).