aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2015-05-20 22:30:38 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-05-21 21:22:19 -0400
commita737222240848c771b2bc44880d3253fb7c03e13 (patch)
tree827cd629a6f74d8f2e6f2af72849f852b542f690
parentb0e01c7241560b4e62b43e397b2bb3484e30e670 (diff)
ACPICA: iASL: Enhance detection of non-ascii or corrupted input files.
ACPICA commit 08170904011f1e8f817d9e3a9f2bb2438aeacf60 For the compiler part (not disassembler). - Characters not within a comment must be be ASCII (0-0x7F), and now either printable or a "space" character. Provides better detection of files that cannot be compiled. This patch only affects iASL which is not in the Linux upstream. Link: https://github.com/acpica/acpica/commit/08170904 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/acutils.h2
-rw-r--r--drivers/acpi/acpica/utfileio.c7
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index 2b3c5bd222f1..d49f5c7a20d9 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -251,7 +251,7 @@ extern const u8 _acpi_ctype[];
251#define _ACPI_DI 0x04 /* '0'-'9' */ 251#define _ACPI_DI 0x04 /* '0'-'9' */
252#define _ACPI_LO 0x02 /* 'a'-'z' */ 252#define _ACPI_LO 0x02 /* 'a'-'z' */
253#define _ACPI_PU 0x10 /* punctuation */ 253#define _ACPI_PU 0x10 /* punctuation */
254#define _ACPI_SP 0x08 /* space */ 254#define _ACPI_SP 0x08 /* space, tab, CR, LF, VT, FF */
255#define _ACPI_UP 0x01 /* 'A'-'Z' */ 255#define _ACPI_UP 0x01 /* 'A'-'Z' */
256#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ 256#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
257 257
diff --git a/drivers/acpi/acpica/utfileio.c b/drivers/acpi/acpica/utfileio.c
index 7e1168be39fa..f72c53c05d64 100644
--- a/drivers/acpi/acpica/utfileio.c
+++ b/drivers/acpi/acpica/utfileio.c
@@ -198,11 +198,8 @@ acpi_ut_read_table(FILE * fp,
198 table_header.length, file_size); 198 table_header.length, file_size);
199 199
200#ifdef ACPI_ASL_COMPILER 200#ifdef ACPI_ASL_COMPILER
201 status = fl_check_for_ascii(fp, NULL, FALSE); 201 acpi_os_printf("File is corrupt or is ASCII text -- "
202 if (ACPI_SUCCESS(status)) { 202 "it must be a binary file\n");
203 acpi_os_printf
204 ("File appears to be ASCII only, must be binary\n");
205 }
206#endif 203#endif
207 return (AE_BAD_HEADER); 204 return (AE_BAD_HEADER);
208 } 205 }