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: <b5f377cd-b046-5cd9-19e4-5b458eb7b50b@oracle.com>
Date:   Wed, 25 May 2022 10:39:28 -0700
From:   Mike Kravetz <mike.kravetz@...cle.com>
To:     Baolin Wang <baolin.wang@...ux.alibaba.com>,
        akpm@...ux-foundation.org, songmuchun@...edance.com
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH] mm/hugetlb: Remove unnecessary
 huge_ptep_set_access_flags() in hugetlb_mcopy_atomic_pte()

On 5/25/22 03:26, Baolin Wang wrote:
> There is no need to update the hugetlb access flags after just setting the
> hugetlb page table entry by set_huge_pte_at(), since the page table entry
> value has no changes. Thus remove the unnecessary huge_ptep_set_access_flags()
> in hugetlb_mcopy_atomic_pte().
> 
> Signed-off-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
> ---
>  mm/hugetlb.c | 2 --
>  1 file changed, 2 deletions(-)

Thanks!  I agree that does nothing and should be removed.

Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>

> 
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 7c468ac..3ad49bf 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -6032,8 +6032,6 @@ int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm,
>  
>  	set_huge_pte_at(dst_mm, dst_addr, dst_pte, _dst_pte);
>  
> -	(void)huge_ptep_set_access_flags(dst_vma, dst_addr, dst_pte, _dst_pte,
> -					dst_vma->vm_flags & VM_WRITE);
>  	hugetlb_count_add(pages_per_huge_page(h), dst_mm);
>  
>  	/* No need to invalidate - it was non-present before */


-- 
Mike Kravetz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ