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]
Message-Id: <20220427101040.bd4532c8ef093b47b3dd9eb5@linux-foundation.org>
Date:   Wed, 27 Apr 2022 10:10:40 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Kefeng Wang <wangkefeng.wang@...wei.com>
Cc:     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 1/4] mm: ioremap: Setup phys_addr of struct vm_struct

On Wed, 27 Apr 2022 20:14:10 +0800 Kefeng Wang <wangkefeng.wang@...wei.com> wrote:

> Show physical address in /proc/vmallocinfo.
> 
> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> ---
>  mm/ioremap.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/mm/ioremap.c b/mm/ioremap.c
> index 5fe598ecd9b7..522ef899c35f 100644
> --- a/mm/ioremap.c
> +++ b/mm/ioremap.c
> @@ -32,6 +32,7 @@ void __iomem *ioremap_prot(phys_addr_t addr, size_t size, unsigned long prot)
>  	if (!area)
>  		return NULL;
>  	vaddr = (unsigned long)area->addr;
> +	area->phys_addr = addr;
>  
>  	if (ioremap_page_range(vaddr, vaddr + size, addr, __pgprot(prot))) {
>  		free_vm_area(area);

Acked-by: Andrew Morton <akpm@...ux-foundation.org>

I checked a bunch of arch-specific implementations of ioremap_prot()
and they're already doing this.  As far as I can tell, only csky and
riscv actually use this file (CONFIG_GENERIC_IOREMAP=y).  But you're
ARM(?) so I'm wondering how come you're patching it?

Someone should do s/addr/phys_addr/ in this function, like the rest of
the world (sensibly) does.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ