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: <gdkhm6ckcrwy6ezetpb6u2m4sfdeqsf4ftg2vb557zipvdepyh@u4f6pyrompd7>
Date: Fri, 5 Dec 2025 22:10:11 +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 01/11] mm: Change the interface of prep_compound_tail()

On Fri, Dec 05, 2025 at 09:49:36PM +0000, Usama Arif wrote:
> 
> 
> On 05/12/2025 19:43, Kiryl Shutsemau wrote:
> > Instead of passing down the head page and tail page index, pass the tail
> > and head pages directly, as well as the order of the compound page.
> > 
> > This is a preparation for changing how the head position is encoded in
> > the tail page.
> > 
> > Signed-off-by: Kiryl Shutsemau <kas@...nel.org>
> > ---
> >  include/linux/page-flags.h |  4 +++-
> >  mm/hugetlb.c               |  8 +++++---
> >  mm/internal.h              | 11 +++++------
> >  mm/mm_init.c               |  2 +-
> >  mm/page_alloc.c            |  2 +-
> >  5 files changed, 15 insertions(+), 12 deletions(-)
> > 
> > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> > index 0091ad1986bf..2c1153dd7e0e 100644
> > --- a/include/linux/page-flags.h
> > +++ b/include/linux/page-flags.h
> > @@ -865,7 +865,9 @@ static inline bool folio_test_large(const struct folio *folio)
> >  	return folio_test_head(folio);
> >  }
> >  
> > -static __always_inline void set_compound_head(struct page *page, struct page *head)
> > +static __always_inline void set_compound_head(struct page *page,
> > +					      struct page *head,
> > +					      unsigned int order)
> 
> I can see that order is used later, I think patch 4, but probably this patch might cause a
> build warning as order is unused? Might be good to integrate that into the later patch?

Is there warning for unused function parameters?

I think it will blow up whole kernel, no?

> Other nit is, do we want const for head here? (Its not there before, but might be good to add).

Sure, can do.

-- 
  Kiryl Shutsemau / Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ