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:   Mon, 19 Feb 2018 22:38:19 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     John Garry <john.garry@...wei.com>
Cc:     Mika Westerberg <mika.westerberg@...ux.intel.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Hanjun Guo <hanjun.guo@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Arnd Bergmann <arnd@...db.de>,
        Mark Rutland <mark.rutland@....com>,
        Olof Johansson <olof@...om.net>,
        Dann Frazier <dann.frazier@...onical.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Rob Herring <robh@...nel.org>, Joe Perches <joe@...ches.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Linux PCI <linux-pci@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linuxarm <linuxarm@...wei.com>, Corey Minyard <minyard@....org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH v14 7/9] ACPI / scan: do not enumerate Indirect IO host children

On Mon, Feb 19, 2018 at 6:48 PM, John Garry <john.garry@...wei.com> wrote:
> Through the logical PIO framework systems which otherwise have
> no IO space access to legacy ISA/LPC devices may access these
> devices through so-called "indirect IO" method. In this, IO
> space accesses for non-PCI hosts are redirected to a host
> LLDD to manually generate the IO space (bus) accesses. Hosts
> are able to register a region in logical PIO space to map to
> its bus address range.
>
> Indirect IO child devices have an associated host-specific bus
> address. Special translation is required to map between
> a logical PIO address for a device and it's host bus address.
>
> Since in the ACPI tables the child device IO resources would
> be the host-specific values, it is required the ACPI scan code
> should not enumerate these devices, and that this should be
> the responsibility of the host driver so that it can "fixup"
> the resources so that they map to the appropriate logical PIO
> addresses.
>
> To avoid enumerating these child devices, we check whether
> the parent for a device is a member of a known list of
> "indirect IO" hosts. For now, the HiSilicon LPC host
> controller ID is added.
>
> To flag a device to not be enumerated, we reuse the existing
> serial bus slave flag.
>
> Signed-off-by: John Garry <john.garry@...wei.com>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

> ---
>  drivers/acpi/scan.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 8e63d93..c1a60852 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -1524,11 +1524,25 @@ static int acpi_check_serial_bus_slave(struct acpi_resource *ares, void *data)
>         return -1;
>  }
>
> +static bool acpi_is_indirect_io_slave(struct acpi_device *device)
> +{
> +       struct acpi_device *parent = device->parent;
> +       const struct acpi_device_id indirect_io_hosts[] = {
> +               {"HISI0191", 0},
> +               {}
> +       };
> +
> +       return parent && !acpi_match_device_ids(parent, indirect_io_hosts);
> +}
> +
>  static bool acpi_is_serial_bus_slave(struct acpi_device *device)
>  {
>         struct list_head resource_list;
>         bool is_serial_bus_slave = false;
>
> +       if (acpi_is_indirect_io_slave(device))
> +               return true;
> +
>         /* Macs use device properties in lieu of _CRS resources */
>         if (x86_apple_machine &&
>             (fwnode_property_present(&device->fwnode, "spiSclkPeriod") ||
> --
> 1.9.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ