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: <2l523g5soivzdi5yinyxdmkdd3k46q4buh5zprdeynplgeay2m@ivmuipyx33hy>
Date: Mon, 8 Dec 2025 10:48:43 +0000
From: Kiryl Shutsemau <kas@...nel.org>
To: Usama Arif <usamaarif642@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, 
	Muchun Song <muchun.song@...ux.dev>, David Hildenbrand <david@...nel.org>, 
	Oscar Salvador <osalvador@...e.de>, Mike Rapoport <rppt@...nel.org>, 
	Vlastimil Babka <vbabka@...e.cz>, Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, 
	Matthew Wilcox <willy@...radead.org>, Zi Yan <ziy@...dia.com>, Baoquan He <bhe@...hat.com>, 
	Michal Hocko <mhocko@...e.com>, Johannes Weiner <hannes@...xchg.org>, 
	Jonathan Corbet <corbet@....net>, kernel-team@...a.com, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH 07/11] mm: Drop fake head checks and fix a race condition

On Sat, Dec 06, 2025 at 05:27:29PM +0000, Usama Arif wrote:
> 
> 
> On 05/12/2025 19:43, Kiryl Shutsemau wrote:
> > Fake heads are no longer in use, so checks for them should be removed.
> > 
> > It simplifies compound_head() and page_ref_add_unless() substantially.
> > 
> 
> Would be good to mention in the commit message what the race condition is as
> its there in the subject. Probably can copy some text from the cover letter.

I forgot to update subject for the patch.

Yes, there's a race window in page_fixed_fake_head() between checking
PG_head and checking compound_info/head in the first tail page.

But the race seems to be harmless.

Unlike the race in 1d798ca3f164 ("mm: make compound_head() robust") the
caller always gets valid pointer to a struct page. It might not belong
to the same compound page anymore if the caller doesn't hold reference
for the page. But it shouldn't be a news for speculative page lookup
path. Caller would need to re-check the page after obtaining reference
anyway.

I will drop "and fix a race condition".

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ