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:   Thu, 28 Apr 2022 08:46:01 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org
Subject: Re: [PATCH 2/4] mm: ioremap: Add arch_ioremap/iounmap_check()

On Thu, Apr 28, 2022 at 02:16:39PM +0800, Kefeng Wang wrote:
> > Pet peeve.  The word "check" is a poor one.  I gives no sense of what
> > the function is checking and it gives no sense of how the function's
> > return value relates to the thing which it checks.
> > 
> > Maybe it returns 0 on success and -EINVAL on failure.  Don't know!
> > 
> > Don't you think that better names would be io_remap_ok(),
> > io_remap_valid(), io_remap_allowed(), etc?
> 
> Will use arch_ioremap/unmap_allowed(), and I'd like to keep return bool
> 
> for now if there is no special requirements.

Actually, there are a few architectures that can successfully ioreamp
without setting up new ptes, e.g. mips.

So I think I'd name them just arch_ioremap and arch_iounmap, and
return a "void __Ń–omem *" from arch_ioremap, where:

 - IS_ERR means return an error
 - NULL means continue to remap
 - a non-NULL, non-IS_ERR pointer is directly returned.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ