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:   Tue, 30 May 2023 15:31:39 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Niklas Schnelle <schnelle@...ux.ibm.com>,
        Jiri Slaby <jirislaby@...nel.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Alan Stern <stern@...land.harvard.edu>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Palmer Dabbelt <palmer@...belt.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        linux-kernel@...r.kernel.org,
        Linux-Arch <linux-arch@...r.kernel.org>,
        linux-pci@...r.kernel.org, Arnd Bergmann <arnd@...nel.org>,
        linux-serial@...r.kernel.org
Subject: Re: [PATCH v4 33/41] tty: serial: handle HAS_IOPORT dependencies

On Tue, May 30, 2023 at 01:53:50PM +0200, Arnd Bergmann wrote:
> On Tue, May 30, 2023, at 12:48, Greg Kroah-Hartman wrote:
> > On Tue, May 16, 2023 at 01:00:29PM +0200, Niklas Schnelle wrote:
> >> In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
> >> not being declared. We thus need to add HAS_IOPORT as dependency for
> >> those drivers using them unconditionally. For 8250 based drivers some
> >> support MMIO only use so fence only the parts requiring I/O ports.
> >
> > Why can't you have dummy inb()/outb() so we don't need these #ifdefs all
> > over the place in .c files?  Was that documented somewhere?  We do that
> > for other driver/hardware apis, why are these so special they don't
> > deserve that?
> 
> That was what our original approach did years ago, and Linus rightfully
> rejected it. Almost every driver either requires inb()/outb() to do
> anything, or it doesn't use them at all. The 8250 uart is one of the
> few exceptions to this, as it has many variants.
> It would be possible to separate this out more in the 8250 driver
> as well and split it out into separate modules and indirect function
> pointers, but that would be a larger rework and have a higher
> risk of regressions.
> 
> Also, the 8250 driver is already full of #ifdef in .c files, 

Yeah, just trying to hope it could be better :(

Ok, I'll go queue up the v5 version of this patch now, thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ