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]
Date:   Thu, 15 Sep 2022 15:05:57 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     "zhaoyang.huang" <zhaoyang.huang@...soc.com>
Cc:     Zhaoyang Huang <huangzhaoyang@...il.com>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>, <ke.wang@...soc.com>
Subject: Re: [PATCHv2] mm: No need to check pcp page when free it to buddy

On Thu, 15 Sep 2022 10:40:54 +0800 "zhaoyang.huang" <zhaoyang.huang@...soc.com> wrote:

> From: Zhaoyang Huang <zhaoyang.huang@...soc.com>
> 
> The pages on pcp list have been checked the validity via bellowing call chain.
> It is no need to check it again when free them back to buddy by free_pcppages_bulk.
> 
> free_unref_page\free_unref_page_list
> {
> ...
> 	//page's validity is checked here
> 	if (!free_unref_page_prepare(page, pfn, order))
> 		return;
> ...
> 	//page added to pcp->lists and status is ready for moving to buddy
> 	list_add(&page->lru, &pcp->lists[pindex]);
> 

The comment over free_pcp_prepare():

/*
 * With DEBUG_VM enabled, order-0 pages are checked immediately when being freed
 * to pcp lists. With debug_pagealloc also enabled, they are also rechecked when
 * moved from pcp lists to free lists.
 */

Which seems sensible - a page's state may have been messed up while
it's in the pcp lists.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ