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: <2c2900eb-886a-5bbe-f7c7-9d74a6399893@huawei.com>
Date:   Wed, 11 May 2022 14:25:34 +0800
From:   Miaohe Lin <linmiaohe@...wei.com>
To:     Rei Yamamoto <yamamoto.rei@...fujitsu.com>,
        <akpm@...ux-foundation.org>
CC:     <mgorman@...hsingularity.net>, <vvghjk1234@...il.com>,
        <aquini@...hat.com>, <ddutile@...hat.com>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm, compaction: fast_find_migrateblock() should return
 pfn in the target zone

On 2022/5/11 12:43, Rei Yamamoto wrote:
> Prevent returning a pfn outside the target zone in case that not
> aligned with pageblock boundary.
> Otherwise isolate_migratepages_block() would handle pages not in
> the target zone.
> 

IIUC, the sole caller isolate_migratepages will ensure the pfn won't outside
the target zone. So the below code change might not be necessary. Or am I miss
something ?

Thanks!

> Signed-off-by: Rei Yamamoto <yamamoto.rei@...fujitsu.com>
> ---
>  mm/compaction.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mm/compaction.c b/mm/compaction.c
> index fe915db6149b..de42b8e48758 100644
> --- a/mm/compaction.c
> +++ b/mm/compaction.c
> @@ -1858,6 +1858,8 @@ static unsigned long fast_find_migrateblock(struct compact_control *cc)
>  
>  				update_fast_start_pfn(cc, free_pfn);
>  				pfn = pageblock_start_pfn(free_pfn);
> +				if (pfn < cc->zone->zone_start_pfn)
> +					pfn = cc->zone->zone_start_pfn;
>  				cc->fast_search_fail = 0;
>  				found_block = true;
>  				set_pageblock_skip(freepage);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ