Morten Linderud
2115c14c93
tpm/eventlog: Don't abort tpm_read_log on faulty ACPI address
...
[ Upstream commit 80a6c216b16d7f5c584d2148c2e4345ea4eb06ce ]
tpm_read_log_acpi() should return -ENODEV when no eventlog from the ACPI
table is found. If the firmware vendor includes an invalid log address
we are unable to map from the ACPI memory and tpm_read_log() returns -EIO
which would abort discovery of the eventlog.
Change the return value from -EIO to -ENODEV when acpi_os_map_iomem()
fails to map the event log.
The following hardware was used to test this issue:
Framework Laptop (Pre-production)
BIOS: INSYDE Corp, Revision: 3.2
TPM Device: NTC, Firmware Revision: 7.2
Dump of the faulty ACPI TPM2 table:
[000h 0000 4] Signature : "TPM2" [Trusted Platform Module hardware interface Table]
[004h 0004 4] Table Length : 0000004C
[008h 0008 1] Revision : 04
[009h 0009 1] Checksum : 2B
[00Ah 0010 6] Oem ID : "INSYDE"
[010h 0016 8] Oem Table ID : "TGL-ULT"
[018h 0024 4] Oem Revision : 00000002
[01Ch 0028 4] Asl Compiler ID : "ACPI"
[020h 0032 4] Asl Compiler Revision : 00040000
[024h 0036 2] Platform Class : 0000
[026h 0038 2] Reserved : 0000
[028h 0040 8] Control Address : 0000000000000000
[030h 0048 4] Start Method : 06 [Memory Mapped I/O]
[034h 0052 12] Method Parameters : 00 00 00 00 00 00 00 00 00 00 00 00
[040h 0064 4] Minimum Log Length : 00010000
[044h 0068 8] Log Address : 000000004053D000
Fixes: 0cf577a03f21 ("tpm: Fix handling of missing event log")
Tested-by: Erkki Eilonen <erkki@bearmetal.eu>
Signed-off-by: Morten Linderud <morten@linderud.pw>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-17 08:48:59 +01:00
..
2023-03-17 08:48:59 +01:00
2020-07-02 17:49:00 +03:00
2021-08-23 19:55:42 +03:00
2021-02-16 10:40:27 +02:00
2021-06-23 16:51:03 +03:00
2022-06-06 08:43:41 +02:00
2022-04-08 14:22:48 +02:00
2019-06-05 17:37:17 +02:00
2019-06-05 17:37:17 +02:00
2023-01-12 11:58:48 +01:00
2022-12-31 13:14:00 +01:00
2019-09-02 17:08:35 +03:00
2019-05-21 11:28:45 +02:00
2019-06-05 17:37:17 +02:00
2019-05-21 11:28:45 +02:00
2022-06-06 08:43:41 +02:00
2021-08-23 19:55:42 +03:00
2019-06-05 17:37:17 +02:00
2019-06-05 17:37:17 +02:00
2021-02-16 10:40:27 +02:00
2022-01-27 11:05:07 +01:00
2021-11-18 19:16:41 +01:00
2022-06-09 10:22:40 +02:00
2020-03-13 03:53:16 +02:00
2021-11-18 19:16:41 +01:00
2019-11-12 21:45:37 +02:00
2020-10-02 00:21:02 +03:00
2023-01-12 11:58:48 +01:00
2019-10-23 17:23:43 +02:00
2022-04-08 14:22:48 +02:00
2022-03-28 09:58:42 +02:00
2019-06-05 17:37:17 +02:00
2020-01-08 18:11:09 +02:00
2022-12-08 11:28:45 +01:00
2021-02-16 10:40:27 +02:00
2022-04-08 14:22:48 +02:00
2020-07-24 09:26:23 +03:00
2019-06-19 17:09:55 +02:00