diff options
author | Lv Zheng <lv.zheng@intel.com> | 2017-07-10 03:23:37 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-20 10:38:25 -0400 |
commit | 04ba15aa55cf16e18757faea55d62d1b7e407fe3 (patch) | |
tree | d1da3f0e12c6686c06bb8aafaa9e3b65dbf0a91b /drivers/acpi | |
parent | 9b019b0f67bf527d6412de0497702026ff37e8a6 (diff) |
ACPICA: Tables: Do not validate signature for dynamic table load
ACPICA commit d3c944f2cdc8c7e847b7942b1864f285189f7bce
Windows seems to allow arbitrary table signatures for Load/load_table
opcodes:
ACPI BIOS Error (bug): Table has invalid signature [PRAD] (0x44415250)
So this patch removes dynamic load signature checks. However we need to
find a way to avoid table loading against tables like MADT. This is not
covered by this commit.
This Windows behavior has been validated on link #1. An end user bug
report can also be found on link #2.
This patch also includes simple cleanup for static load signature check
code. Reported by Ye Xiaolong, Fixed by Lv Zheng.
Link: https://github.com/acpica/acpica/commit/d3c944f2
Link: https://github.com/acpica/acpica/pull/121 [#1]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=118601 [#2]
Reported-by: Ye Xiaolong <xiaolong.ye@intel.com>
Reported-by: Olga Uhina <olga.uhina@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/tbinstal.c | 28 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbxfload.c | 2 |
2 files changed, 1 insertions, 29 deletions
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c index ee745152f25b..9d212967fad8 100644 --- a/drivers/acpi/acpica/tbinstal.c +++ b/drivers/acpi/acpica/tbinstal.c | |||
@@ -222,34 +222,6 @@ acpi_tb_install_standard_table(acpi_physical_address address, | |||
222 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | 222 | (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); |
223 | 223 | ||
224 | if (reload) { | 224 | if (reload) { |
225 | /* | ||
226 | * Validate the incoming table signature. | ||
227 | * | ||
228 | * 1) Originally, we checked the table signature for "SSDT" or "PSDT". | ||
229 | * 2) We added support for OEMx tables, signature "OEM". | ||
230 | * 3) Valid tables were encountered with a null signature, so we just | ||
231 | * gave up on validating the signature, (05/2008). | ||
232 | * 4) We encountered non-AML tables such as the MADT, which caused | ||
233 | * interpreter errors and kernel faults. So now, we once again allow | ||
234 | * only "SSDT", "OEMx", and now, also a null signature. (05/2011). | ||
235 | */ | ||
236 | if ((new_table_desc.signature.ascii[0] != 0x00) && | ||
237 | (!ACPI_COMPARE_NAME | ||
238 | (&new_table_desc.signature, ACPI_SIG_SSDT)) | ||
239 | && (strncmp(new_table_desc.signature.ascii, "OEM", 3))) { | ||
240 | ACPI_BIOS_ERROR((AE_INFO, | ||
241 | "Table has invalid signature [%4.4s] (0x%8.8X), " | ||
242 | "must be SSDT or OEMx", | ||
243 | acpi_ut_valid_nameseg(new_table_desc. | ||
244 | signature. | ||
245 | ascii) ? | ||
246 | new_table_desc.signature. | ||
247 | ascii : "????", | ||
248 | new_table_desc.signature.integer)); | ||
249 | |||
250 | status = AE_BAD_SIGNATURE; | ||
251 | goto unlock_and_exit; | ||
252 | } | ||
253 | 225 | ||
254 | /* Check if table is already registered */ | 226 | /* Check if table is already registered */ |
255 | 227 | ||
diff --git a/drivers/acpi/acpica/tbxfload.c b/drivers/acpi/acpica/tbxfload.c index b71ce3b817ea..d81f442228b8 100644 --- a/drivers/acpi/acpica/tbxfload.c +++ b/drivers/acpi/acpica/tbxfload.c | |||
@@ -206,7 +206,7 @@ acpi_status acpi_tb_load_namespace(void) | |||
206 | for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) { | 206 | for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) { |
207 | table = &acpi_gbl_root_table_list.tables[i]; | 207 | table = &acpi_gbl_root_table_list.tables[i]; |
208 | 208 | ||
209 | if (!acpi_gbl_root_table_list.tables[i].address || | 209 | if (!table->address || |
210 | (!ACPI_COMPARE_NAME(table->signature.ascii, ACPI_SIG_SSDT) | 210 | (!ACPI_COMPARE_NAME(table->signature.ascii, ACPI_SIG_SSDT) |
211 | && !ACPI_COMPARE_NAME(table->signature.ascii, | 211 | && !ACPI_COMPARE_NAME(table->signature.ascii, |
212 | ACPI_SIG_PSDT) | 212 | ACPI_SIG_PSDT) |