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, 23 Aug 2022 09:19:07 +0800
From:   Baoquan He <bhe@...hat.com>
To:     Christophe Leroy <christophe.leroy@...roup.eu>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "hch@...radead.org" <hch@...radead.org>,
        "agordeev@...ux.ibm.com" <agordeev@...ux.ibm.com>,
        "wangkefeng.wang@...wei.com" <wangkefeng.wang@...wei.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 02/11] mm: ioremap: fixup the physical address and
 page prot

On 08/22/22 at 06:30am, Christophe Leroy wrote:
> 
> 
> Le 20/08/2022 à 02:31, Baoquan He a écrit :
> > On some architectures, the physical address need be fixed up before
> > doing mapping, e.g, parisc. And on architectures, e.g arc, the
> > parameter 'prot' passed into ioremap_prot() need be adjusted too.
> > 
> > In oder to convert them to take GENERIC_IOREMAP method, we need wrap
> > the address fixing up code and page prot adjusting code into arch_ioremap()
> > and pass the new address and 'prot' out for ioremap_prot() handling.
> 
> Is it really the best approach ? Wouldn't it be better to have helpers 
> to do that, those helpers being called by the ioremap_prot(), instead of 
> doing it inside the arch_ioremap() function ?

This is suggested too by Alexander during his v1 reviewing. I tried, but
feel the current way taken in this patchset is better. Because not all
architecutres need the address fix up, only parisc, and only few need
adjust the 'prot'. Introducing other helpers seems too much, that only
increases the complexity of of ioremap() and the generic GENERIC_IOREMAP
method for people to understand and take.

> 
> > 
> > This is a preparation patch, no functionality change.
> 
> Could this be squashed into previous patch ?

Yep, will do. Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ