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: <CAK8P3a3AddBGnBV=6wK+LZDjZD05k=9tBBWd7LWm6smXLcfREQ@mail.gmail.com>
Date:   Wed, 4 May 2022 21:58:01 +0200
From:   Arnd Bergmann <arnd@...nel.org>
To:     Bjorn Helgaas <helgaas@...nel.org>
Cc:     Niklas Schnelle <schnelle@...ux.ibm.com>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        linux-pci <linux-pci@...r.kernel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        "open list:ACPI" <linux-acpi@...r.kernel.org>
Subject: Re: [RFC v2 02/39] ACPI: add dependency on HAS_IOPORT

On Wed, May 4, 2022 at 7:53 PM Bjorn Helgaas <helgaas@...nel.org> wrote:
>
> On Fri, Apr 29, 2022 at 03:50:00PM +0200, Niklas Schnelle wrote:
> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > not being declared. As ACPI always uses I/O port access we simply depend
> > on HAS_IOPORT.
>
> CONFIG_ACPI depends on ARCH_SUPPORTS_ACPI, which is only set by arm64,
> ia64, and x86, all of which support I/O port access.  So does this
> actually solve a problem?  I wouldn't think you'd be able to build
> ACPI on s390 even without this patch.
> "ACPI always uses I/O port access" is a pretty broad brush, and it
> would be useful to know specifically what the dependencies are.
>
> Many ACPI hardware accesses use acpi_hw_read()/acpi_hw_write(), which
> use either MMIO or I/O port accesses depending on what the firmware
> told us.

I think this came from my original prototype of the series where I tested it
out on arm64 with HAS_IOPORT disabled. I would like to hide the definition
of inb()/outb() from include/asm-generic/io.h whenever CONFIG_HAS_IOPORT
is not set, and I was prototyping this on arm64.

There are uses of inb()/outb() in drivers/acpi/ec.c and drivers/acpi/osl.c,
which in turn are not optional in ACPI, so it seems that those are
required.

If we want to allow building arm64 without HAS_IOPORT for some reason,
that means either force-disabling ACPI as well, or changin ACPI to not
rely on port I/O. I think it's fine to leave that as a problem for whoever
wants to make HAS_IOPORT optional in the future, and drop the
dependency here.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ