From: Al Stone <ahs3 at redhat.com>
To: devel@acpica.org
Subject: [Devel] [PATCH] faulty name compares on big-endian machines
Date: Thu, 21 Mar 2013 19:02:28 -0600 [thread overview]
Message-ID: <514BADA4.5070901@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]
When iasl is checking for GPE name conflicts on big-endian machines,
the comparisons will fail when they should succeed.
The failure is due to the name bytes being in the wrong order. The
bytes are in the wrong order because the name is being treated as a
32-bit integer and not as a string.
This patch causes the name to be used as a string and works properly
on big- and little-endian machines running iasl.
This was found by running tests/misc/badcode.asl through iasl on a
big-endian machine (PPC and s390) and noting that it would not catch
the error at line 184 in badcode.asl that was being caught elsewhere.
Signed-off-by: Al Stone <ahs3(a)redhat.com>
--
source/compiler/aslanalyze.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/compiler/aslanalyze.c b/source/compiler/aslanalyze.c
index 99b17e6..bd6272a 100644
--- a/source/compiler/aslanalyze.c
+++ b/source/compiler/aslanalyze.c
@@ -516,7 +516,7 @@ ApCheckForGpeNameConflict (
/* Need a null-terminated string version of NameSeg */
- ACPI_MOVE_32_TO_32 (Name, &Op->Asl.NameSeg);
+ ACPI_MOVE_NAME (Name, &Op->Asl.NameSeg);
Name[ACPI_NAME_SIZE] = 0;
/*
@@ -543,7 +543,7 @@ ApCheckForGpeNameConflict (
* We are now sure we have an _Lxx or _Exx.
* Create the target name that would cause collision (Flip E/L)
*/
- ACPI_MOVE_32_TO_32 (Target, Name);
+ ACPI_MOVE_NAME (Target, Name);
/* Inject opposite letter ("L" versus "E") */
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3(a)redhat.com
-----------------------------------
reply other threads:[~2013-03-22 1:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=514BADA4.5070901@redhat.com \
--to=devel@acpica.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.