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]
Message-ID: <CAJZ5v0j43dhVcbsKyJ8BZjeBbXHNFG-Vtv-UtsJwFBYP4usNFQ@mail.gmail.com>
Date:   Wed, 27 Oct 2021 19:23:43 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Linux ACPI <linux-acpi@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Hans de Goede <hdegoede@...hat.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>
Subject: Re: [PATCH] ACPI: glue: Use acpi_device_adr() in acpi_find_child_device()

On Wed, Oct 27, 2021 at 7:17 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> On Wed, Oct 27, 2021 at 06:59:06PM +0200, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >
> > Instead of evaluating _ADR in acpi_find_child_device(), use the
> > observation that it has already been evaluated and the value returned
> > by it has been stored in the pnp.type.bus_address field of the ACPI
> > device object at hand.
>
> ...
>
> > +             acpi_bus_address addr = acpi_device_adr(adev);
> >               int score;
> >
> > -             status = acpi_evaluate_integer(adev->handle, METHOD_NAME__ADR,
> > -                                            NULL, &addr);
> > -             if (ACPI_FAILURE(status) || addr != address)
> > +             if (!adev->pnp.type.bus_address || addr != address)
> >                       continue;
>
> I'm not sure I understand the new check, i.e. !adev->pnp.type.bus_address.

See acpi_set_pnp_ids().

adev->pnp.bus_addres is the address value and
adev->pnp.type.bus_address is a flag that is set to 1 when _ADR is
valid.

> IIUC _ADR == 0 is a valid value and children may have it like this.

That's true.

> I believe this change will break the working things (first comes to my mind
> is drivers/mfd/intel_quark_i2c_gpio.c).

I don't think so.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ