[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251002080304.GA26368@dev-dsk-acsjakub-1b-6f9934e2.eu-west-1.amazon.com>
Date: Thu, 2 Oct 2025 08:03:04 +0000
From: Jakub Acs <acsjakub@...zon.de>
To: David Hildenbrand <david@...hat.com>
CC: <linux-mm@...ck.org>, <akpm@...ux-foundation.org>, <xu.xin16@....com.cn>,
<chengming.zhou@...ux.dev>, <peterx@...hat.com>, <axelrasmussen@...gle.com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 2/2] mm: redefine VM_* flag constants with BIT()
On Wed, Oct 01, 2025 at 04:04:51PM +0200, David Hildenbrand wrote:
> >-#define VM_GROWSDOWN 0x00000100 /* general info on the segment */
> >+#define VM_GROWSDOWN BIT(8) /* general info on the segment */
> > #ifdef CONFIG_MMU
> >-#define VM_UFFD_MISSING 0x00000200 /* missing pages tracking */
> >+#define VM_UFFD_MISSING BIT(9) /* missing pages tracking */
> > #else /* CONFIG_MMU */
> >-#define VM_MAYOVERLAY 0x00000200 /* nommu: R/O MAP_PRIVATE mapping that might overlay a file mapping */
> >+#define VM_MAYOVERLAY BIT(10) /* nommu: R/O MAP_PRIVATE mapping that might overlay a file mapping */
>
> Careful: VM_UFFD_MISSING and VM_MAYOVERLAY share the same bit,
> depending on CONFIG_MMU (9).
>
> > #define VM_UFFD_MISSING 0
> > #endif /* CONFIG_MMU */
> >-#define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */
> >-#define VM_UFFD_WP 0x00001000 /* wrprotect pages tracking */
> >+#define VM_PFNMAP BIT(11) /* Page-ranges managed without "struct page", just pure PFN */
>
> -> 10
Ugh, thanks for catching these!
>
> 11 is actually unused IIUC.
>
> >+#define VM_UFFD_WP BIT(12) /* wrprotect pages tracking */
>
> This seems to be correct again.
>
>
> IIRC, Andrew prefers not mixing fixes and cleanups in the same
> series if possible. So you might just want to send out patch #1
> separately and, send out patch #2 separately with a note under the
> --- that it depends on patch #1.
>
I saw that patch #1 was applied so will leave that alone now, but took a
note for future.
For completeness adding the link to v4:
https://lore.kernel.org/all/20251002075202.11306-1-acsjakub@amazon.de/
Many Thanks,
Jakub
Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christian Schlaeger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597
Powered by blists - more mailing lists