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:   Thu, 9 Aug 2018 11:35:08 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Hans de Goede <hdegoede@...hat.com>
Cc:     "Rafael J . Wysocki" <rjw@...ysocki.net>,
        Len Brown <lenb@...nel.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Darren Hart <dvhart@...radead.org>,
        Wolfram Sang <wsa@...-dreams.de>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        linux-i2c <linux-i2c@...r.kernel.org>
Subject: Re: [PATCH v5 1/4] ACPI / scan: Initialize status to ACPI_STA_DEFAULT

On Thu, Aug 9, 2018 at 11:15 AM, Hans de Goede <hdegoede@...hat.com> wrote:
> Since commit 63347db0affa ("ACPI / scan: Use acpi_bus_get_status() to
> initialize ACPI_TYPE_DEVICE devs") the status field of normal acpi_devices
> gets set to 0 by acpi_bus_type_and_status() and filled with its actual
> value later when acpi_add_single_object() calls acpi_bus_get_status().
>
> This means that any acpi_match_device_ids() calls in between will always
> fail with -ENOENT.
>
> We already have a workaround for this, which temporary forces status to
> ACPI_STA_DEFAULT in drivers/acpi/x86/utils.c: acpi_device_always_present()
> and the next commit in this series adds another acpi_match_device_ids()
> call between status being initialized as 0 and the acpi_bus_get_status()
> call.
>
> Rather then adding another workaround, this commit makes
> acpi_bus_type_and_status() initialize status to ACPI_STA_DEFAULT, this is
> safe to do as the only code looking at status between the initialization
> and the acpi_bus_get_status() call is those acpi_match_device_ids() calls.
>
> Note this does mean that we need to (re)set status to 0 in case the
> acpi_bus_get_status() call fails.
>
> Signed-off-by: Hans de Goede <hdegoede@...hat.com>
> ---
> Changes in v3:
> -New patch in v3 of this patch-set
>
> Changes in v4:
> -This is not a fix for acpi_is_indirect_io_slave() as I thought at first,
>  acpi_is_indirect_io_slave() calls acpi_match_device_ids() on its parent
>  device, where status is already set properly. Rewrite the commit message
>  accordingly.

I've applied the v4 of this patch and I don't think there are any
changes from it here.

As for the rest of the series I'll wait from comments from Wolfram and
the other reviewers.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ