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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YTH+OVMeZo4GlOlg@osiris>
Date:   Fri, 3 Sep 2021 12:51:37 +0200
From:   Heiko Carstens <hca@...ux.ibm.com>
To:     Niklas Schnelle <schnelle@...ux.ibm.com>,
        Arnd Bergmann <arnd@...db.de>
Cc:     Chunyan Zhang <zhang.lyra@...il.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        linux-s390@...r.kernel.org, kernel test robot <lkp@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Chunyan Zhang <chunyan.zhang@...soc.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] s390/io: Fix ioremap and iounmap undefinded issue for
 s390

On Fri, Sep 03, 2021 at 12:28:41PM +0200, Niklas Schnelle wrote:
> On Fri, 2021-09-03 at 17:40 +0800, Chunyan Zhang wrote:
> > On Fri, 3 Sept 2021 at 16:24, Niklas Schnelle <schnelle@...ux.ibm.com> wrote:
> > > On Fri, 2021-09-03 at 16:03 +0800, Chunyan Zhang wrote:
> > > > From: Chunyan Zhang <chunyan.zhang@...soc.com>
> > > > 
> > > > There would not be ioremap and iounmap implementations if CONFIG_PCI is
> > > > not set for s390, so add default declarations of these two functions
> > > > for the case to avoid 'undefined reference' issue.
> > > > 
> > > > Fixes: 71ba41c9b1d9 ("s390/pci: provide support for MIO instructions")
> > > > Reported-by: kernel test robot <lkp@...el.com>
> > > > Signed-off-by: Chunyan Zhang <chunyan.zhang@...soc.com>
> > > > ---
> > > > The issue was reported from https://lkml.org/lkml/2021/8/1/18
...
> > Actually HAS_IOMEM is set as default on other architectures, but not
> > for s390 which redefined it.
> 
> Yes because most architectures always have IOMEM and io*map() functions
> I believe. s390 is an exception here as the mainframe native
> functionality all works without MMIO and you can run a fully functional
> system including networking and block devices without any MMIO, PCI and
> without ioremap()/iounmap().
> 
> > 
> > > At the very least I think the functions should do a WARN_ONCE() but
> > > then we have the same situation as discussed below with Linus making it
> > > pretty clear that he prefers these cases to be compile time checked:
> > 
> > Ok, if I understand correctly, if io*map is not implemented for some
> > case, there should be a *compile-time* error rather than adding a stub
> > function to make this kind of errors disappeared.
> > 
> > Please correct me if I missed something.
> 
> Ideally not a compile time error but a compile time flag such as a
> Kconfig option that would make sure that if HAS_IOMEM isn't set we
> don't get drivers compiled which depend on working io*map(). After all
> these drivers will surely not be functional.

Please note that Arnd Bergmann started to work on that:
https://lkml.org/lkml/2021/7/5/286

However, as far as I can tell, there is nothing like that in
linux-next currently.

Arnd, are you still working on this?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ