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: <2f7ce228-0b7d-4b59-82b0-5d14e884bba5@redhat.com>
Date: Mon, 26 Aug 2024 17:29:14 +0200
From: David Hildenbrand <david@...hat.com>
To: Qi Zheng <zhengqi.arch@...edance.com>, hughd@...gle.com,
 willy@...radead.org, muchun.song@...ux.dev, vbabka@...nel.org,
 akpm@...ux-foundation.org, rppt@...nel.org, vishal.moola@...il.com,
 peterx@...hat.com, ryan.roberts@....com, christophe.leroy2@...soprasteria.com
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 linux-arm-kernel@...ts.infradead.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v2 04/14] mm: filemap: filemap_fault_recheck_pte_none()
 use pte_offset_map_ro_nolock()

On 22.08.24 09:13, Qi Zheng wrote:
> In filemap_fault_recheck_pte_none(), we just do pte_none() check, so
> convert it to using pte_offset_map_ro_nolock().
> 
> Signed-off-by: Qi Zheng <zhengqi.arch@...edance.com>
> ---
>   mm/filemap.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 0f13126b43b08..c98da9af6b9bd 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -3234,8 +3234,8 @@ static vm_fault_t filemap_fault_recheck_pte_none(struct vm_fault *vmf)
>   	if (!(vmf->flags & FAULT_FLAG_ORIG_PTE_VALID))
>   		return 0;
>   
> -	ptep = pte_offset_map_nolock(vma->vm_mm, vmf->pmd, vmf->address,
> -				     &vmf->ptl);
> +	ptep = pte_offset_map_ro_nolock(vma->vm_mm, vmf->pmd, vmf->address,
> +					&vmf->ptl);
>   	if (unlikely(!ptep))
>   		return VM_FAULT_NOPAGE;
>   

Acked-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ