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:   Tue, 24 May 2022 22:31:03 +0800
From:   Kefeng Wang <wangkefeng.wang@...wei.com>
To:     Arnd Bergmann <arnd@...db.de>
CC:     kernel test robot <lkp@...el.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        <kbuild-all@...ts.01.org>, Linux-MM <linux-mm@...ck.org>,
        Christoph Hellwig <hch@...radead.org>,
        "Anshuman Khandual" <anshuman.khandual@....com>
Subject: Re: [PATCH v3 4/6] mm: ioremap: Add arch_ioremap/iounmap()


On 2022/5/24 20:35, Arnd Bergmann wrote:
> On Tue, May 24, 2022 at 11:48 AM Kefeng Wang <wangkefeng.wang@...wei.com> wrote:
>>>>> mm/ioremap.c:59:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const *addr @@     got void [noderef] __iomem *vaddr @@
>>>      mm/ioremap.c:59:16: sparse:     expected void const *addr
>>>      mm/ioremap.c:59:16: sparse:     got void [noderef] __iomem *vaddr
>>>
>>> vim +59 mm/ioremap.c
>>>
>>>       51
>>>       52       void iounmap(volatile void __iomem *addr)
>>>       53       {
>>>       54               void __iomem *vaddr = (void __iomem *)((unsigned long)addr & PAGE_MASK);
>>>       55
>>>       56               if (arch_iounmap(vaddr))
>>>       57                       return;
>>>       58
>>>     > 59               vunmap(vaddr);
>> 1) Will add generic "arch_ioremap/arch_iounmap define"
>>
>> 2) and change this to vunmap((void *)vaddr);
> I think this need an extra __force to actually suppress the sparse
> warning, as in
>
>          vunmap((void __force *)vaddr);
>
> Using __force is usually wrong, this is one of the exceptions, so
> maybe add a comment
> as well.
Right, I found this too, and  using  ___force in local, will update, thank.
>
>           Arnd
>
> .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ