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: <Z-4GuZZ_BjFNm9Gq@fedora>
Date: Wed, 2 Apr 2025 20:55:37 -0700
From: "Vishal Moola (Oracle)" <vishal.moola@...il.com>
To: Ye Liu <ye.liu@...ux.dev>
Cc: Matthew Wilcox <willy@...radead.org>, akpm@...ux-foundation.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Markus.Elfring@....de, Ye Liu <liuye@...inos.cn>,
	Sidhartha Kumar <sidhartha.kumar@...cle.com>,
	Anshuman Khandual <anshuman.khandual@....com>
Subject: Re: [PATCH v4] mm/page_alloc: Consolidate unlikely handling in
 page_expected_state

On Wed, Apr 02, 2025 at 10:49:17AM +0800, Ye Liu wrote:
> 
> 在 2025/3/31 23:59, Matthew Wilcox 写道:
> > On Mon, Mar 31, 2025 at 08:08:01PM +0800, Ye Liu wrote:
> >> 在 2025/3/28 22:29, Matthew Wilcox 写道:
> >>> On Fri, Mar 28, 2025 at 09:47:57AM +0800, Ye Liu wrote:
> >>>> Consolidate the handling of unlikely conditions in the 
> >>>> page_expected_state() function to reduce code duplication and improve 
> >>>> readability.
> >>> I don't think this is an equivalent transformation.
> >> Could you explain it in detail?
> > page_expected_state() is called both at free and alloc.  I think
> > the correct behaviour on encountering a HWPOISON page should be
> > different at alloc and free, don't you?
> In the alloc process, this patch does not modify the code behavior.
> Regarding the free process, the if (unlikely(PageHWPoison(page)) && !order)
> code handles the case where order is 0. When order is not 0, it does not
> matter if __ClearPageBuddy is used to process the last page of the compound
> page, because page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP; will also clear it.
> Is that right?                                                             

I believe a page's "Buddy" flag is stored in page->type, so maybe this
won't do what you expect?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ