From 50c9ebc5aa74ee97625f754acaacde86ed3228d5 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Jul 07 2018 00:47:37 +0000 Subject: Add a new patch to repair big-endian support Changes in the way length fields were used caused big-endian patches to no longer behave correctly; this patch repairs that. Signed-off-by: Al Stone --- diff --git a/acpica-tools.spec b/acpica-tools.spec index 4ac4815..60040a1 100644 --- a/acpica-tools.spec +++ b/acpica-tools.spec @@ -41,6 +41,7 @@ Patch14: cve-2017-13694.patch Patch15: cve-2017-13695.patch Patch16: str-trunc-warn.patch Patch17: ptr-cast.patch +Patch18: aslcodegen.patch BuildRequires: bison patchutils flex gcc @@ -108,6 +109,7 @@ gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f - %patch15 -p1 -b .cve-2017-13695 %patch16 -p1 -b .str-trunc-warn %patch17 -p1 -b .ptr-cast +%patch18 -p1 -b .aslcodegen cp -p %{SOURCE2} README.Fedora cp -p %{SOURCE3} iasl.1 diff --git a/aslcodegen.patch b/aslcodegen.patch new file mode 100644 index 0000000..a9a00be --- /dev/null +++ b/aslcodegen.patch @@ -0,0 +1,28 @@ +Changes in the handling of comments caused some length fields to be used +in new ways. The new way broke the existing adaptation for big endian +support; this patch repairs that adaptation. + +Signed-off-by: Al Stone + +diff -Naur acpica-unix2-20180531.orig/source/compiler/aslcodegen.c acpica-unix2-20180531/source/compiler/aslcodegen.c +--- acpica-unix2-20180531.orig/source/compiler/aslcodegen.c 2018-07-06 20:28:35.255546578 -0400 ++++ acpica-unix2-20180531/source/compiler/aslcodegen.c 2018-07-06 20:32:10.373797644 -0400 +@@ -494,8 +494,7 @@ + + /* Table length. Checksum zero for now, will rewrite later */ + +- DWord = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength; +- ACPI_MOVE_32_TO_32(&TableHeader.Length, &DWord); ++ TableHeader.Length = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength; + + /* Calculate the comment lengths for this definition block parseOp */ + +@@ -539,6 +538,8 @@ + CvDbgPrint (" Length: %u\n", CommentLength); + } + } ++ DWord = TableHeader.Length; ++ ACPI_MOVE_32_TO_32(&TableHeader.Length, &DWord); + + TableHeader.Checksum = 0; +