lkml.org 
[lkml]   [2020]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] tpm: Add support for event log pointer found in TPM2 ACPI table
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
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-04-01 07:09    [W:0.059 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site