Skip to content

Commit

Permalink
ACPI: acpi_enforce_resource=strict by default
Browse files Browse the repository at this point in the history
Enforce strict resource checking - disallowing access by native
drivers to IO ports and memory regions claimed by ACPI firmware.

The patch is mainly aimed to block native hwmon drivers from touching
monitoring chips that ACPI thinks it own.

If this causes a regression, boot with "acpi_enforce_resources=lax"
which was the previous default.

http://bugzilla.kernel.org/show_bug.cgi?id=12376
http://bugzilla.kernel.org/show_bug.cgi?id=12541

Signed-off-by: Luca Tettamanti <[email protected]>
Acked-by: Pavel Machek <[email protected]>
Acked-by: Jean Delvare <[email protected]>
Signed-off-by: Len Brown <[email protected]>
  • Loading branch information
tettamanti authored and lenb committed Apr 2, 2009
1 parent 8e0ee43 commit 7e90560
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
16 changes: 16 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,22 @@ and is between 256 and 4096 characters. It is defined in the file
to assume that this machine's pmtimer latches its value
and always returns good values.

acpi_enforce_resources= [ACPI]
{ strict | lax | no }
Check for resource conflicts between native drivers
and ACPI OperationRegions (SystemIO and SystemMemory
only). IO ports and memory declared in ACPI might be
used by the ACPI subsystem in arbitrary AML code and
can interfere with legacy drivers.
strict (default): access to resources claimed by ACPI
is denied; legacy drivers trying to access reserved
resources will fail to bind to device using them.
lax: access to resources claimed by ACPI is allowed;
legacy drivers trying to access reserved resources
will bind successfully but a warning message is logged.
no: ACPI OperationRegions are not marked as reserved,
no further checks are performed.

agp= [AGP]
{ off | try_unsupported }
off: disable AGP support
Expand Down
6 changes: 3 additions & 3 deletions drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,9 +1063,9 @@ __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
* in arbitrary AML code and can interfere with legacy drivers.
* acpi_enforce_resources= can be set to:
*
* - strict (2)
* - strict (default) (2)
* -> further driver trying to access the resources will not load
* - lax (default) (1)
* - lax (1)
* -> further driver trying to access the resources will load, but you
* get a system message that something might go wrong...
*
Expand All @@ -1077,7 +1077,7 @@ __setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);
#define ENFORCE_RESOURCES_LAX 1
#define ENFORCE_RESOURCES_NO 0

static unsigned int acpi_enforce_resources = ENFORCE_RESOURCES_LAX;
static unsigned int acpi_enforce_resources = ENFORCE_RESOURCES_STRICT;

static int __init acpi_enforce_resources_setup(char *str)
{
Expand Down

0 comments on commit 7e90560

Please sign in to comment.