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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0ef29a80-5873-ddf6-bfb0-7d1b5c17b8c0@arm.com>
Date:   Thu, 1 Apr 2021 20:11:30 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     Shixin Liu <liushixin2@...wei.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next 3/3] mm/debug_vm_pgtable: Remove useless pfn_pmd()



On 4/1/21 7:53 AM, Shixin Liu wrote:
> The call to pfn_pmd() here is redundant.
> 
> Signed-off-by: Shixin Liu <liushixin2@...wei.com>
> ---
>  mm/debug_vm_pgtable.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c
> index c379bbe42c2a..9f4c4a114229 100644
> --- a/mm/debug_vm_pgtable.c
> +++ b/mm/debug_vm_pgtable.c
> @@ -196,7 +196,6 @@ static void __init pmd_advanced_tests(struct mm_struct *mm,
>  
>  	pgtable_trans_huge_deposit(mm, pmdp, pgtable);
>  
> -	pmd = pfn_pmd(pfn, prot);
>  	set_pmd_at(mm, vaddr, pmdp, pmd);
>  	pmdp_set_wrprotect(mm, vaddr, pmdp);
>  	pmd = READ_ONCE(*pmdp);
> 

Instead drop the first pfn_pmd(), as that pmd would not be required
when THP is not enabled. Also, please fold this with the first patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ