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] [day] [month] [year] [list]
Message-ID: <31c2d7d7-eaee-4730-9d27-05740f8ef911@collabora.com>
Date: Thu, 11 Jan 2024 14:04:36 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Hui Zhu <teawaterz@...ux.alibaba.com>, akpm@...ux-foundation.org,
 david@...hat.com, avagin@...gle.com, peterx@...hat.com, hughd@...gle.com,
 ryan.roberts@....com, wangkefeng.wang@...wei.com, Liam.Howlett@...cle.com,
 adobriyan@...il.com, linux-kernel@...r.kernel.org,
 linux-fsdevel@...r.kernel.org
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>, teawater@...il.com,
 Hui Zhu <teawater@...group.com>
Subject: Re: [PATCH] fs/proc/task_mmu.c: add_to_pagemap: Remove useless
 parameter addr

On 1/11/24 1:45 PM, Hui Zhu wrote:
> From: Hui Zhu <teawater@...group.com>
> 
> Function parameters addr of add_to_pagemap is useless.
> This commit remove it.
> 
> Signed-off-by: Hui Zhu <teawater@...group.com>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
Tested-by: Muhammad Usama Anjum <usama.anjum@...labora.com>

> ---
>  fs/proc/task_mmu.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 62b16f42d5d2..882e2569fc31 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -1352,8 +1352,7 @@ static inline pagemap_entry_t make_pme(u64 frame, u64 flags)
>  	return (pagemap_entry_t) { .pme = (frame & PM_PFRAME_MASK) | flags };
>  }
>  
> -static int add_to_pagemap(unsigned long addr, pagemap_entry_t *pme,
> -			  struct pagemapread *pm)
> +static int add_to_pagemap(pagemap_entry_t *pme, struct pagemapread *pm)
>  {
>  	pm->buffer[pm->pos++] = *pme;
>  	if (pm->pos >= pm->len)
> @@ -1380,7 +1379,7 @@ static int pagemap_pte_hole(unsigned long start, unsigned long end,
>  			hole_end = end;
>  
>  		for (; addr < hole_end; addr += PAGE_SIZE) {
> -			err = add_to_pagemap(addr, &pme, pm);
> +			err = add_to_pagemap(&pme, pm);
>  			if (err)
>  				goto out;
>  		}
> @@ -1392,7 +1391,7 @@ static int pagemap_pte_hole(unsigned long start, unsigned long end,
>  		if (vma->vm_flags & VM_SOFTDIRTY)
>  			pme = make_pme(0, PM_SOFT_DIRTY);
>  		for (; addr < min(end, vma->vm_end); addr += PAGE_SIZE) {
> -			err = add_to_pagemap(addr, &pme, pm);
> +			err = add_to_pagemap(&pme, pm);
>  			if (err)
>  				goto out;
>  		}
> @@ -1519,7 +1518,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
>  		for (; addr != end; addr += PAGE_SIZE) {
>  			pagemap_entry_t pme = make_pme(frame, flags);
>  
> -			err = add_to_pagemap(addr, &pme, pm);
> +			err = add_to_pagemap(&pme, pm);
>  			if (err)
>  				break;
>  			if (pm->show_pfn) {
> @@ -1547,7 +1546,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
>  		pagemap_entry_t pme;
>  
>  		pme = pte_to_pagemap_entry(pm, vma, addr, ptep_get(pte));
> -		err = add_to_pagemap(addr, &pme, pm);
> +		err = add_to_pagemap(&pme, pm);
>  		if (err)
>  			break;
>  	}
> @@ -1597,7 +1596,7 @@ static int pagemap_hugetlb_range(pte_t *ptep, unsigned long hmask,
>  	for (; addr != end; addr += PAGE_SIZE) {
>  		pagemap_entry_t pme = make_pme(frame, flags);
>  
> -		err = add_to_pagemap(addr, &pme, pm);
> +		err = add_to_pagemap(&pme, pm);
>  		if (err)
>  			return err;
>  		if (pm->show_pfn && (flags & PM_PRESENT))

-- 
BR,
Muhammad Usama Anjum

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ