Most recent kernel where this bug did not occur: Distribution: Hardware Environment: Software Environment: Problem Description: The Linux kernel ACPI interpreter fails the following AML test when it is compiled into a simulator. So if an OEM BIOS includes this code, Linux would fail. Steps to reproduce: Run interpreter with the .asl demo code attached below.
Created attachment 6187 [details] ASL code to reproduce bug. The examples given in the attached demo program strictly follow the new (April 2005) Data Type Conversion Rules specs (17.2.5.7) and show the following contradictions with them: Bug 1: Add("0x1111", 0) - returns 0x1111 but the correct value is 0. Bug 2: Add("00000000000012345678", 0) - returns 0x12345678 but the correct value is 0x1234. Bug 3: Add("12345678901234560", 0) - causes AE_BAD_HEX_CONSTANT exception, but should not. INTERNAL BUG NUMBER 63
Created attachment 7224 [details] Proposed patch TESTED: The update was tested by the ASLTS test suite runs (all the test cases) on the following systems: - CYGWIN_NT-5.1 1.5.18(0.132/4/2) 2005-07-02 20:30 i686 unknown unknown Cygwin - Linux 2.6.5-7.191-smp #1 SMP Tue Jun 28 14:58:56 UTC 2005 i686 i686 i386 GNU/Linux for the following modes supported by the ASLTS test suite: - 32-bit norm mode - 64-bit norm mode - 64-bit slack mode # 32-bit slack mode (currently impossible to run tests in this mode due to Bug 198) The tests were run (on the systems described above) before update, then the tests were run on those systems after update. Then results of two runs were compared. All is Ok (the relevant error fixed, no new errors). SUPPORTED FEATURES (of ToInteger AML operator and Implicit Conversion from String to Integer). Particular cases of String-image of Data: 1. "0x1234cd" ('0x' works for ToInteger only) Result: ToInteger -->> 0x1234cd Implicit Conversion -->> 0 2. " 0x1234cd" (white space before image of Data is skipped) ToInteger -->> 0x1234cd Implicit -->> 0 3. "1234" (image without '0x': ToInteger-->>decimal; Implicit-->>hex) ToInteger -->> 1234 Implicit -->> 0x1234 4. "0000000000000000000000001234" (zeros before significant characters in image without '0x' are skipped). ToInteger -->> 1234 Implicit -->> 0x1234 Exceptions of ToInteger occur in the following cases: 5. "1234cd" (non-decimal character in dec-image). 6. "000x1234" (non-decimal character in dec-image). 7. "0x1234cdQ" (non-hex character in '0x'-image). 8. "1234 " (white space in dec image). 9. "0x1234cd " (white space in '0x'-image). 10. "0x 1234cdQ" (white space after '0x'). 11. (decimal image exceeding maximal). 32-bit mode
Fix integrated into ACPICA version 20060526
ACPICA 20060608 shipped in Linux 2.6.17-git9, closed.