From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean Delvare Subject: Re: [PATCH] ACPI: add "auto" to acpi_enforce_resources Date: Mon, 30 Mar 2009 09:36:41 +0200 Message-ID: <20090330093641.66bd520b@hyperion.delvare> References: <20090204142015.GB3923@srcf.ucam.org> <20090210145716.105ab58b@hyperion.delvare> <20090210140829.GA25397@srcf.ucam.org> <49919E08.5050002@redhat.com> <20090210172408.400cacee@hyperion.delvare> <20090227132740.GF1482@ucw.cz> <68676e00903240539i119b6d26j516ee131d4cd6781@mail.gmail.com> <49C8DE51.2010103@redhat.com> <20090329201617.GA10303@dreamland.darkstar.lan> <20090329225501.0c1771f1@hyperion.delvare> <20090329220127.GA12822@dreamland.darkstar.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from zone0.gcu-squad.org ([212.85.147.21]:38867 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751725AbZC3Hg6 (ORCPT ); Mon, 30 Mar 2009 03:36:58 -0400 In-Reply-To: <20090329220127.GA12822@dreamland.darkstar.lan> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Luca Tettamanti Cc: Hans de Goede , linux-kernel@vger.kernel.org, Matthew Garrett , Len Brown , Thomas Renninger , linux-acpi@vger.kernel.org, Pavel Machek On Mon, 30 Mar 2009 00:01:27 +0200, Luca Tettamanti wrote: > here's a revised patch: > --- > > The following patch changes the default value for option "acpi_enforce_resource" > to strict. It enforces 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. > > Signed-off-by: Luca Tettamanti Acked-by: Jean Delvare > --- > Documentation/kernel-parameters.txt | 16 ++++++++++++++++ > drivers/acpi/osl.c | 6 +++--- > 2 files changed, 19 insertions(+), 3 deletions(-) > > Index: b/Documentation/kernel-parameters.txt > =================================================================== > --- a/Documentation/kernel-parameters.txt 2009-03-29 23:58:11.574893074 +0200 > +++ b/Documentation/kernel-parameters.txt 2009-03-29 23:58:31.582894852 +0200 > @@ -259,6 +259,22 @@ > 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 > Index: b/drivers/acpi/osl.c > =================================================================== > --- a/drivers/acpi/osl.c 2009-03-29 23:58:11.942913535 +0200 > +++ b/drivers/acpi/osl.c 2009-03-29 23:58:31.586892815 +0200 > @@ -1070,9 +1070,9 @@ > * 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... > * > @@ -1084,7 +1084,7 @@ > #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) > { > > > Luca -- Jean Delvare