Skip to content

Commit

Permalink
ACPICA: iasl/acpiexec: Update input file handling and verification
Browse files Browse the repository at this point in the history
ACPICA commit 3a6f2a516dd35a4daacbc5b5144d1db763ff2cb0

Improve and cleanup verification of ACPI tables within input files.
Share more code between the disassembler and acpiexec.

This patch only affects application debugger commands, thus it is a
no-op chage for Linux kernel.

Link: https://github.com/acpica/acpica/commit/3a6f2a51
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>
  • Loading branch information
Bob Moore authored and Rafael J. Wysocki committed Jan 1, 2016
1 parent 2ba7379 commit 395ec73
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
10 changes: 7 additions & 3 deletions drivers/acpi/acpica/acapps.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,13 @@
/* acfileio */

acpi_status
acpi_ac_get_all_tables_from_file(char *filename,
u8 get_only_aml_tables,
struct acpi_new_table_desc **return_list_head);
ac_get_all_tables_from_file(char *filename,
u8 get_only_aml_tables,
struct acpi_new_table_desc **return_list_head);

u8 ac_is_file_binary(FILE * file);

acpi_status ac_validate_table_header(FILE * file, long table_offset);

/* Values for get_only_aml_tables */

Expand Down
7 changes: 3 additions & 4 deletions drivers/acpi/acpica/dbinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,10 +1056,9 @@ acpi_db_command_dispatch(char *input_buffer,
struct acpi_new_table_desc *list_head = NULL;

status =
acpi_ac_get_all_tables_from_file(acpi_gbl_db_args
[1],
ACPI_GET_ALL_TABLES,
&list_head);
ac_get_all_tables_from_file(acpi_gbl_db_args[1],
ACPI_GET_ALL_TABLES,
&list_head);
if (ACPI_SUCCESS(status)) {
acpi_db_load_tables(list_head);
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/exmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc,

default:

ACPI_ERROR((AE_INFO, "Unknown Reference Class 0x%2.2X",
ACPI_ERROR((AE_INFO, "Invalid Reference Class 0x%2.2X",
obj_desc->reference.class));
return_ACPI_STATUS(AE_AML_INTERNAL);
return_ACPI_STATUS(AE_AML_OPERAND_TYPE);
}
break;

Expand Down
8 changes: 1 addition & 7 deletions drivers/acpi/acpica/tbutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address)
*
* PARAMETERS: signature - Sig string to be validated
*
* RETURN: TRUE if signature is correct length and has valid characters
* RETURN: TRUE if signature is has 4 valid ACPI characters
*
* DESCRIPTION: Validate an ACPI table signature.
*
Expand All @@ -399,12 +399,6 @@ u8 acpi_is_valid_signature(char *signature)
{
u32 i;

/* Validate the signature length */

if (strlen(signature) != ACPI_NAME_SIZE) {
return (FALSE);
}

/* Validate each character in the signature */

for (i = 0; i < ACPI_NAME_SIZE; i++) {
Expand Down

0 comments on commit 395ec73

Please sign in to comment.