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: <c0b74f54-c39a-51f7-08f8-701e9af94e56@huawei.com>
Date:   Wed, 26 Jan 2022 10:18:38 +0800
From:   Chen Wandun <chenwandun@...wei.com>
To:     Vlastimil Babka <vbabka@...e.cz>, <akpm@...ux-foundation.org>,
        <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
        <guillaume.tucker@...labora.com>
CC:     <regressions@...ts.linux.dev>, Oscar Salvador <osalvador@...e.de>
Subject: Re: [PATCH] Revert "mm/page_isolation: unset migratetype directly for
 non Buddy page"



在 2022/1/26 0:40, Vlastimil Babka 写道:
> On 1/17/22 15:27, Chen Wandun wrote:
>> This reverts commit 075782149abff45ee22f27315eced44d02b96779.
>>
>> commit 075782149abf ("mm/page_isolation: unset migratetype directly for
> That's an old -next commit id, it went to mainline as 721fb891ad0b
> ("mm/page_isolation: unset migratetype directly for non Buddy page")
>
>> non Buddy page") will result memory that should in buddy disappear by
>> mistake. move_freepages_block move all pages in pageblock instead of
>> pages indicated by input parameter, so if input pages is not in buddy
>> but other pages in pageblock is in buddy, it will result in page out of
>> control.
>>
>> Reported-by: "kernelci.org bot" <bot@...nelci.org>
>> Signed-off-by: Chen Wandun <chenwandun@...wei.com>
> Acked-by: Vlastimil Babka <vbabka@...e.cz>
>
> #regzbot ^introduced: 721fb891ad0b
>
> There should better be also:
>
> Fixes: 721fb891ad0b ("mm/page_isolation: unset migratetype directly for non
> Buddy page")
>
> Especially as that commit had a (inadequate, IMHO, for an optimization)
> Fixes: tag and could end up being backported somewhere without the followup
> fix/revert.
thanks, I will send v2
>
>> ---
>>   mm/page_isolation.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/mm/page_isolation.c b/mm/page_isolation.c
>> index 6a0ddda6b3c5..f67c4c70f17f 100644
>> --- a/mm/page_isolation.c
>> +++ b/mm/page_isolation.c
>> @@ -115,7 +115,7 @@ static void unset_migratetype_isolate(struct page *page, unsigned migratetype)
>>   	 * onlining - just onlined memory won't immediately be considered for
>>   	 * allocation.
>>   	 */
>> -	if (!isolated_page && PageBuddy(page)) {
>> +	if (!isolated_page) {
>>   		nr_pages = move_freepages_block(zone, page, migratetype, NULL);
>>   		__mod_zone_freepage_state(zone, nr_pages, migratetype);
>>   	}
> .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ