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: <CAK8P3a02vidd7u5Kp6UJj=9tj_hFGL24SmzuNpDGu1GOa1w9+w@mail.gmail.com>
Date:   Wed, 4 May 2022 12:33:23 +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>,
        Dominik Brodowski <linux@...inikbrodowski.net>
Subject: Re: [RFC v2 25/39] pcmcia: add HAS_IOPORT dependencies

On Wed, May 4, 2022 at 1:38 AM Bjorn Helgaas <helgaas@...nel.org> wrote:
> On Fri, Apr 29, 2022 at 03:50:41PM +0200, Niklas Schnelle wrote:
> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> > not being declared. PCMCIA devices are either LEGACY_PCI devices
> > which implies HAS_IOPORT or require HAS_IOPORT.
> >
> > Acked-by: Dominik Brodowski <linux@...inikbrodowski.net>
> > Co-developed-by: Arnd Bergmann <arnd@...nel.org>
> > Signed-off-by: Niklas Schnelle <schnelle@...ux.ibm.com>
> > ---
> >  drivers/pcmcia/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
> > index 2ce261cfff8e..32b5cd324c58 100644
> > --- a/drivers/pcmcia/Kconfig
> > +++ b/drivers/pcmcia/Kconfig
> > @@ -5,7 +5,7 @@
> >
> >  menuconfig PCCARD
> >       tristate "PCCard (PCMCIA/CardBus) support"
> > -     depends on !UML
> > +     depends on HAS_IOPORT
>
> I don't know much about PC Card.  Is there a requirement that these
> devices must use I/O port space?  If so, can you include a spec
> reference in the commit log?

I think for PCMCIA devices, the dependency makes sense because
all device drivers for PCMCIA devices need I/O ports.

For cardbus, we can go either way, I don't see any reference to
I/O ports in yenta_socket.c or the pccard core, so it would build
fine with or without I/O ports.

> I do see the PC Card spec, r8.1, sec 5.5.4.2.2 says:
>
>   All CardBus PC Card adapters must support either memory-mapped I/O
>   or both memory-mapped I/O and I/O space. The selection will depend
>   largely on the system architecture the adapter is intended to be
>   used in. The requirement to also support memory-mapped I/O, if I/O
>   space is supported, is driven by the potential emergence of
>   memory-mapped I/O only cards. Supporting both modes may also
>   position the adapter to be sold into multiple system architectures.
>
> which sounds like I/O space is optional.

An earlier version of the patch series had a separate
CONFIG_LEGACY_PCI that required CONFIG_HAS_IOPORT
here, which I think made this clearer:

Almost all architectures that support CONFIG_PCI also provide
HAS_IOPORT today (at least at compile time, if not at runtime),
with s390 as a notable exception. Any machines that have legacy
PCI device support will also have I/O ports because a lot of
legacy PCI cards used it, and any machine with a pc-card slot
should also support legacy PCI devices.

If we get new architectures without I/O space in the future, they
would certainly not care about supporting old cardbus devices.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ