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, 10 Aug 2023 16:43:29 +0800
From:   Dylan Jhong <dylan@...estech.com>
To:     Alexandre Ghiti <alexghiti@...osinc.com>
CC:     Andrew Morton <akpm@...ux-foundation.org>,
        Uladzislau Rezki <urezki@...il.com>,
        Christoph Hellwig <hch@...radead.org>,
        Lorenzo Stoakes <lstoakes@...il.com>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -fixes] mm: Add a call to flush_cache_vmap() in vmap_pfn()

On Wed, Aug 09, 2023 at 06:46:33PM +0200, Alexandre Ghiti wrote:
> flush_cache_vmap() must be called after new vmalloc mappings are
> installed in the page table in order to allow architectures to make sure
> the new mapping is visible.
> 
> Fixes: 3e9a9e256b1e ("mm: add a vmap_pfn function")
> Reported-by: Dylan Jhong <dylan@...estech.com>
> Closes: https://lore.kernel.org/linux-riscv/ZMytNY2J8iyjbPPy@atctrx.andestech.com/
> Signed-off-by: Alexandre Ghiti <alexghiti@...osinc.com>
> ---
>  mm/vmalloc.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 93cf99aba335..228a4a5312f2 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -2979,6 +2979,10 @@ void *vmap_pfn(unsigned long *pfns, unsigned int count, pgprot_t prot)
>  		free_vm_area(area);
>  		return NULL;
>  	}
> +
> +	flush_cache_vmap((unsigned long)area->addr,
> +			 (unsigned long)area->addr + count * PAGE_SIZE);
> +
>  	return area->addr;
>  }
>  EXPORT_SYMBOL_GPL(vmap_pfn);
> -- 
> 2.39.2
> 

Hi Alex,

Looks good to me. Thanks.
Reviewed-by: Dylan Jhong <dylan@...estech.com>

Best regards,
Dylan Jhong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ