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: <20230105193251.112393-1-sj@kernel.org>
Date:   Thu,  5 Jan 2023 19:32:51 +0000
From:   SeongJae Park <sj@...nel.org>
To:     Liam Howlett <liam.howlett@...cle.com>
Cc:     "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        SeongJae Park <sj@...nel.org>,
        "damon@...ts.linux.dev" <damon@...ts.linux.dev>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v2 26/44] mm/damon: Stop using vma_mas_store() for maple tree store

Hi Liam,

On Thu, 5 Jan 2023 19:16:00 +0000 Liam Howlett <liam.howlett@...cle.com> wrote:

> From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
> 
> Prepare for the removal of the vma_mas_store() function by open coding
> the maple tree store in this test code.

But seems this series is not really removing 'vma_mas_store()'.  Wouldn't it
better to do the preparation and removal together in a same patch series?

> Set the range of the maple
> state and call the store function directly.
> 
> Cc: SeongJae Park <sj@...nel.org>
> Cc: damon@...ts.linux.dev
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
> ---
>  mm/damon/vaddr-test.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/damon/vaddr-test.h b/mm/damon/vaddr-test.h
> index bce37c487540..41532f7355d0 100644
> --- a/mm/damon/vaddr-test.h
> +++ b/mm/damon/vaddr-test.h
> @@ -24,8 +24,10 @@ static void __link_vmas(struct maple_tree *mt, struct vm_area_struct *vmas,
>  		return;
>  
>  	mas_lock(&mas);
> -	for (i = 0; i < nr_vmas; i++)
> -		vma_mas_store(&vmas[i], &mas);
> +	for (i = 0; i < nr_vmas; i++) {
> +		mas_set_range(&mas, vmas[i].vm_start, vmas[i].vm_end - 1);
> +		mas_store_gfp(&mas, &vmas[i], GFP_KERNEL);
> +	}

On the latest mm-unstable, vma_mas_store() uses mas_store_prealloc() instead of
mas_store_gfp().  Seems the difference would make no problem to this test code
in most cases, but could I ask the reason for this change?

Also, should we check the return value of mas_store_gfp()?

>  	mas_unlock(&mas);
>  }
>  
> -- 
> 2.35.1


Thanks,
SJ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ