lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 24 Jan 2018 16:44:14 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Sinan Kaya <okaya@...eaurora.org>,
        Hans de Goede <hdegoede@...hat.com>
Cc:     Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Wolfram Sang <wsa@...-dreams.de>,
        Eric Auger <eric.auger@...hat.com>, eric.auger.pro@...il.com,
        linux-i2c <linux-i2c@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH v2] i2c: Allow ACPI_I2C_OPREGION if I2C is built as a module

On Wed, Jan 24, 2018 at 3:29 PM, Sinan Kaya <okaya@...eaurora.org> wrote:
> +linux-acpi

+Cc: Hans

> On 1/24/2018 1:27 AM, Mika Westerberg wrote:
>> On Wed, Jan 24, 2018 at 06:56:16AM +0100, Wolfram Sang wrote:
>>> On Wed, Jan 03, 2018 at 03:02:31PM +0100, Eric Auger wrote:
>>>> If I2C is built as a module, ACPI_I2C_OPREGION cannot be set
>>>> and any ACPI opregion calls targeting I2C fail with no opregion found.
>>>>
>>>> This patch allows ACPI_I2C_OPREGION to be enabled both if I2C is
>>>> built into the kernel or built as a module.
>>>>
>>>> Signed-off-by: Eric Auger <eric.auger@...hat.com>
>>>
>>> I recall that we had some discussion until ending up with the current
>>> solution. And I finally found it again:
>>>
>>> http://www.serverphorums.com/read.php?12,1001402
>>>
>>> In any case, I surely want Mika's ack on any change to ACPI related
>>> Kconfig symbols. Adding him to CC...
>>
>> So the problem is/was that what happens if you are in a middle of BIOS
>> AML code touching the opregion and someone unloads the opregion handler?
>> If you can quarantee nothing bad happens, then I'm fine with the patch :)
>>
>
> Rafael to correct me if I got this right.
>
> The behavior of the operating system is well defined in the ACPI specification.
>
> Here is what I tested recently:
>
> ACPI defines _REG method to inform firmware of presence/removal of an operating
> region.
>
> When driver gets loaded, ACPI calls the _REG method with 1 argument. When driver
> gets unloaded, ACPI call the _REG method with 0 argument.
>
> Firmware can use this notification to its advantage to determine when an I2C
> related functionality should be accessed or not.
>
> If firmware doesn't use the _REG method, ACPI defines that AML statements
> accessing the operating region are ignored.
>
> You'll also see a warning from ACPICA saying the OperatingRegion 9 is no longer
> accessible and AML code execution failed.
>

> Also note that someone can always unbind an I2C driver from ACPI even with built-in
> module.

No, you can't. There are user(s) of that, i.e. PMIC, otherwise, of
course, you may do that.

> I think we are talking about an orthogonal issue here.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ