public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] Add CONFIG_ACPI_RELAXED_AML option
@ 2002-12-13 16:22 Moore, Robert
       [not found] ` <B9ECACBD6885D5119ADC00508B68C1EA0D19B9AB-LkGsggTGxVmSsB6bSF6DdVDQ4js95KgL@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Moore, Robert @ 2002-12-13 16:22 UTC (permalink / raw)
  To: 'Herbert Nachtnebel', NoZizzing OrDripping,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: Therien, Guy, Grover, Andrew

I must agree that this is a really bad idea.  Once we start allowing these
kinds of errors to slip by, there is potentially no end to it.  It's a very
slippery slope that will potentially plunge everyone into the same kind of
BIOS abyss that ACPI was intended to solve in the first place.

Worse, there are situations where the AML interpreter cannot "guess" what
the ASL/AML (BIOS) coder actually intended, i.e., there are multiple
solutions to the problem.

What is really being proposed here is for Linux ACPI to be bug-for-bug
compatible with Microsoft.  This is impossible to do deterministically
because the MS interpreter is closed source.  The only standard that we have
that we can code to is the ACPI specification, and this has to be the last
word on the matter.

We have a good opportunity here to help drive the industry to proper BIOS
and ACPI implementations by following the specification and developing tools
(such as the iASL compiler) that help enforce conformance to the ACPI
specification -- and also giving feedback to the BIOS vendors about their
broken ASL code.

Bob Moore


-----Original Message-----
From: Herbert Nachtnebel [mailto:Herbert.Nachtnebel-8zxNtbQCHXIjuwv8T7myQQ@public.gmane.org] 
Sent: Friday, December 13, 2002 1:30 AM
To: NoZizzing OrDripping; acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: AW: [ACPI] [PATCH] Add CONFIG_ACPI_RELAXED_AML option

That's a really bad idea! This size checks are identented to assure, that
important data which accidently follows the buffer can't be overridden by
brain dead bios coders. Now you allow buffer overflow injection into linux
from the bios!
These are serious bios faults, in my DSDT I had to extend a buffer by 128
bytes to avoid a buffer overflow! 
The situation doesn't get better if we ignore such errors. We have to urge
the manufacturers to correct the DSDT's. And the best way to do this is to
recognise the faults and blame them.

Herbert.


> -----Ursprüngliche Nachricht-----
> Von: NoZizzing OrDripping [mailto:nozizzingordripping-/E1597aS9LQAvxtiuMwx3w@public.gmane.org]
> Gesendet: Freitag, 13. Dezember 2002 05:48
> An: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Betreff: [ACPI] [PATCH] Add CONFIG_ACPI_RELAXED_AML option
> 
> 
> The patch adds a new configuration option,
> CONFIG_ACPI_RELAXED_AML.  When turned on,
> the ACPI code will become forgiving of minor
> errors in the AML code.
> 
> For this first cut, the patch and option will ignore
> region size errors.  An off-by-one error is often
> found in the AML shipped with Toshiba laptops,
> even new models. This minor error prevents the
> AC module from operating without this patch.
> 
> I urge the adoption of this patch (or something
> similar) into the ACPI code.  This will make it
> much easier to install and proliferate Linux on
> a large category of laptops.
> 
> Rick Richardson
> rickr-EySxSuIQeMUAvxtiuMwx3w@public.gmane.org
> [Sorry, have to use my Yahoo account to post to this list)
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Acpi-devel mailing list
Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/acpi-devel


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: [PATCH] Add CONFIG_ACPI_RELAXED_AML option
@ 2002-12-13 22:31 Grover, Andrew
  0 siblings, 0 replies; 14+ messages in thread
From: Grover, Andrew @ 2002-12-13 22:31 UTC (permalink / raw)
  To: 'Craig Whitmore', Matthew Tippett, chbm-tNiY1ywYjSU
  Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> From: Craig Whitmore [mailto:lennon-q3Ck4f9/EBK9koe0gwxAeg@public.gmane.org] 
> > > distributed in windows drivers.
> >
> > Continuing with this thread, would it make sense to be ACPI 
> compliant
> > but allow 'custom' dsdts to be passed to the acpi subsystem to allow
> > users to work around less than perfect implementations from
> > manufacturers.
> >
> 
> Just 1 question. What do the manufacturer's say when you tell 
> them they have
> a "broken" dsdt? Do they normally fix it? or give some excuse 
> in a reason
> why they won't fix it?

It varies. BIOS bugs exposed by Linux may be prioritized lower due to
Linux's market position in laptops. They also may not get attention if they
are on end-of-lifed machines, or rolled into a BIOS update only when enough
other bugs are fixed to justify a new BIOS's validation and release. (We may
*say* to them it is a trivial fix, but the only way to know if it breaks
Windows is for them to test it!)

There also isn't always a clear way to report BIOS bugs from end users.

On the upside, the things we're seeing are almost always obviously wrong and
easy to fix - it's just getting them to make the trivial change.

Regards -- Andy


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/

^ permalink raw reply	[flat|nested] 14+ messages in thread
* RE: [PATCH] Add CONFIG_ACPI_RELAXED_AML option
@ 2002-12-13 10:55 Herbert Nachtnebel
  0 siblings, 0 replies; 14+ messages in thread
From: Herbert Nachtnebel @ 2002-12-13 10:55 UTC (permalink / raw)
  To: Alan Cox; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> 
> Allocating 1 byte of slack, giving a loud warning about the 
> problem and
> erroring if we exceed the 1 byte of slack doesn't sound so bad though?
> 

Sure, that's an option. But look at the presented "fix". 
Just ignoring the error is plain wrong.

Herbert.


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH] Add CONFIG_ACPI_RELAXED_AML option
@ 2002-12-13  4:48 NoZizzing OrDripping
  0 siblings, 0 replies; 14+ messages in thread
From: NoZizzing OrDripping @ 2002-12-13  4:48 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: Type: text/plain, Size: 839 bytes --]

The patch adds a new configuration option,
CONFIG_ACPI_RELAXED_AML.  When turned on,
the ACPI code will become forgiving of minor
errors in the AML code.

For this first cut, the patch and option will ignore
region size errors.  An off-by-one error is often
found in the AML shipped with Toshiba laptops,
even new models. This minor error prevents the
AC module from operating without this patch.

I urge the adoption of this patch (or something
similar) into the ACPI code.  This will make it
much easier to install and proliferate Linux on
a large category of laptops.

Rick Richardson
rickr-EySxSuIQeMUAvxtiuMwx3w@public.gmane.org
[Sorry, have to use my Yahoo account to post to this list)

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

[-- Attachment #2: relaxed-aml.diff --]
[-- Type: application/octet-stream, Size: 2169 bytes --]

diff -u -r linux-2.4.20+acpi-20021205/Documentation/Configure.help linux-2.4.20+acpi-20021205+rick/Documentation/Configure.help
--- linux-2.4.20+acpi-20021205/Documentation/Configure.help	2002-12-12 14:25:15.000000000 -0600
+++ linux-2.4.20+acpi-20021205+rick/Documentation/Configure.help	2002-12-12 13:42:40.000000000 -0600
@@ -18406,6 +18406,14 @@
   of verbosity. Saying Y enables these statements. This will increase
   your kernel size by around 50K.
 
+ACPI Relaxed AML Checking
+CONFIG_ACPI_RELAXED_AML
+  If you say `Y' here, the ACPI interpreter will relax its checking
+  for valid AML and will ignore some AML mistakes, such as off-by-one
+  errors in region sizes.  Some laptps may require this option.  In
+  particular, many Toshiba laptops require this for correct operation
+  of the AC module.
+
 ACPI Bus Manager
 CONFIG_ACPI_BUSMGR
   The ACPI Bus Manager enumerates devices in the ACPI namespace, and
diff -u -r linux-2.4.20+acpi-20021205/drivers/acpi/Config.in linux-2.4.20+acpi-20021205+rick/drivers/acpi/Config.in
--- linux-2.4.20+acpi-20021205/drivers/acpi/Config.in	2002-12-07 08:11:29.000000000 -0600
+++ linux-2.4.20+acpi-20021205+rick/drivers/acpi/Config.in	2002-12-12 13:31:23.000000000 -0600
@@ -36,6 +36,7 @@
       fi
       tristate     '  Toshiba Laptop Extras'	CONFIG_ACPI_TOSHIBA
       bool         '  Debug Statements'	CONFIG_ACPI_DEBUG
+      bool         '  Relaxed AML Checking'	CONFIG_ACPI_RELAXED_AML
     fi
   fi
 
diff -u -r linux-2.4.20+acpi-20021205/drivers/acpi/executer/exfldio.c linux-2.4.20+acpi-20021205+rick/drivers/acpi/executer/exfldio.c
--- linux-2.4.20+acpi-20021205/drivers/acpi/executer/exfldio.c	2002-12-07 08:11:30.000000000 -0600
+++ linux-2.4.20+acpi-20021205+rick/drivers/acpi/executer/exfldio.c	2002-12-12 14:04:49.000000000 -0600
@@ -121,7 +121,11 @@
 			field_datum_byte_offset, obj_desc->common_field.access_byte_width,
 			rgn_desc->region.node->name.ascii, rgn_desc->region.length));
 
-		return_ACPI_STATUS (AE_AML_REGION_LIMIT);
+		#ifdef CONFIG_ACPI_RELAXED_AML
+			return_ACPI_STATUS (AE_OK);
+		#else
+			return_ACPI_STATUS (AE_AML_REGION_LIMIT);
+		#endif
 	}
 
 	return_ACPI_STATUS (AE_OK);

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2002-12-16 16:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-13 16:22 [PATCH] Add CONFIG_ACPI_RELAXED_AML option Moore, Robert
     [not found] ` <B9ECACBD6885D5119ADC00508B68C1EA0D19B9AB-LkGsggTGxVmSsB6bSF6DdVDQ4js95KgL@public.gmane.org>
2002-12-13 17:18   ` Carlos Morgado
     [not found]     ` <20021213171815.GS5382-V9yvzcrGID8XxY44YfPCZCanxOoIfzq+@public.gmane.org>
2002-12-13 18:14       ` Matthew Tippett
2002-12-13 19:52         ` Craig Whitmore
     [not found]           ` <01ac01c2a2e8$67571d70$3746028e@bio.dfo.ca>
     [not found]             ` <001901c2a2f7$1f2eae50$0100000a@lennon>
2002-12-16 13:06               ` Derek Broughton
2002-12-13 18:15       ` Ducrot Bruno
2002-12-15 20:59   ` Pavel Machek
     [not found]     ` <20021215205944.GA6330-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2002-12-16 14:34       ` NoZizzing OrDripping
     [not found]         ` <20021216143410.21977.qmail-wdi6g2619JCA/QwVtaZbd3CJp6faPEW9@public.gmane.org>
2002-12-16 16:19           ` Alan Cox
     [not found]             ` <1040055593.13786.56.camel-MMxVpc8zpTQVh3rx8e9g/fyykp6/JSeS3vcXtXqGYxw@public.gmane.org>
2002-12-16 16:05               ` Andrew Kohlsmith
2002-12-16 16:22           ` Carlos Morgado
  -- strict thread matches above, loose matches on Subject: below --
2002-12-13 22:31 Grover, Andrew
2002-12-13 10:55 Herbert Nachtnebel
2002-12-13  4:48 NoZizzing OrDripping

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox