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: <CAK1f24mkswwY71EKourpw1y-KiFi08OkGzZSBkutoj+UCgbLMg@mail.gmail.com>
Date: Thu, 17 Apr 2025 21:24:33 +0800
From: Lance Yang <ioworker0@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org, Mingzhe Yang <mingzhe.yang@...com>
Subject: Re: [PATCH 1/1] mm/rmap: add CONFIG_MM_ID guard for folio_test_large_maybe_mapped_shared()

Hi David,

Thanks for taking the time to review!

On Thu, Apr 17, 2025 at 8:56 PM David Hildenbrand <david@...hat.com> wrote:
>
> On 17.04.25 14:49, Lance Yang wrote:
> > Add a compile-time check to make sure folio_test_large_maybe_mapped_shared()
> > is only used with CONFIG_MM_ID enabled, as it directly accesses the _mm_ids
> > field that only works under CONFIG_MM_ID.
> >
> > Suggested-by: David Hildenbrand <david@...hat.com>
> > Signed-off-by: Mingzhe Yang <mingzhe.yang@...com>
>
> ^ should that be here?

Yep, that's my email too ;p

>
> > Signed-off-by: Lance Yang <ioworker0@...il.com>
> > ---
> >   include/linux/page-flags.h | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> > index d3909cb1e576..6bd9b9043976 100644
> > --- a/include/linux/page-flags.h
> > +++ b/include/linux/page-flags.h
> > @@ -1232,6 +1232,8 @@ static inline int folio_has_private(const struct folio *folio)
> >
> >   static inline bool folio_test_large_maybe_mapped_shared(const struct folio *folio)
> >   {
> > +     /* This function should never be called without CONFIG_MM_ID enabled. */
> > +     BUILD_BUG_ON(!IS_ENABLED(CONFIG_MM_ID));
> >       return test_bit(FOLIO_MM_IDS_SHARED_BITNUM, &folio->_mm_ids);
> >   }
> >   #undef PF_ANY
>
> That should work. I can throw this into a cross-compile setup later if I
> get to it.
>

Yeah, just built kernels with and without both CONFIG_MM_ID and
CONFIG_TRANSPARENT_HUGEPAGE -- no issues either way ;p

> Acked-by: David Hildenbrand <david@...hat.com>

Thanks again for your time,
Lance

>
> --
> Cheers,
>
> David / dhildenb
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ