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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 03 Sep 2021 10:24:40 +0200
From:   Niklas Schnelle <schnelle@...ux.ibm.com>
To:     Chunyan Zhang <zhang.lyra@...il.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Heiko Carstens <hca@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ibm.com>
Cc:     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, 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

Thanks for the patch but I'm a little skeptical about adding
ioremap()/iounmap() stubs that don't do anything useful and on top ofn
that would do so silently.

In the above discussion you said that TIMER_OF should depend on
HAS_IOMEM. In arch/s390/Kconfig HAS_IOMEM is set if and only if
CONFIG_PCI is set so that sounds to me like it would prevent the
undefined reference without the risk of someone trying to use io*map()
without CONFIG_PCI.

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:

https://lkml.org/lkml/2021/7/2/511


> ---
>  arch/s390/include/asm/io.h | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h
> index e3882b012bfa..9438370c6445 100644
> --- a/arch/s390/include/asm/io.h
> +++ b/arch/s390/include/asm/io.h
> @@ -23,11 +23,8 @@ void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
>  #define IO_SPACE_LIMIT 0
>  
> 
.. snip ..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ