From: Jakub Acs <acsjakub@amazon.de>
To: David Hildenbrand <david@redhat.com>
Cc: <linux-mm@kvack.org>, <akpm@linux-foundation.org>,
<xu.xin16@zte.com.cn>, <chengming.zhou@linux.dev>,
<peterx@redhat.com>, <axelrasmussen@google.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] mm: redefine VM_* flag constants with BIT()
Date: Thu, 2 Oct 2025 08:03:04 +0000 [thread overview]
Message-ID: <20251002080304.GA26368@dev-dsk-acsjakub-1b-6f9934e2.eu-west-1.amazon.com> (raw)
In-Reply-To: <98cad9a6-875f-49c2-99b2-389bf4fd9b55@redhat.com>
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
next prev parent reply other threads:[~2025-10-02 8:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-01 9:03 [PATCH v3 0/2] mm, ksm: fix flag-dropping behavior Jakub Acs
2025-10-01 9:03 ` [PATCH v3 1/2] mm/ksm: fix flag-dropping behavior in ksm_madvise Jakub Acs
2025-10-01 14:06 ` David Hildenbrand
2025-10-01 16:43 ` SeongJae Park
2025-11-06 10:39 ` Vlastimil Babka
2025-11-06 11:16 ` David Hildenbrand (Red Hat)
2025-11-07 9:49 ` Jakub Acs
2025-11-10 10:00 ` Vlastimil Babka
2025-10-01 9:03 ` [PATCH v3 2/2] mm: redefine VM_* flag constants with BIT() Jakub Acs
2025-10-01 14:04 ` David Hildenbrand
2025-10-02 8:03 ` Jakub Acs [this message]
2025-10-01 16:51 ` SeongJae Park
2025-10-02 7:29 ` David Hildenbrand
2025-10-02 17:39 ` SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251002080304.GA26368@dev-dsk-acsjakub-1b-6f9934e2.eu-west-1.amazon.com \
--to=acsjakub@amazon.de \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=chengming.zhou@linux.dev \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=xu.xin16@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox