From: "Xu Xin (vivo)" <xu.xin@linux.dev>
To: david@kernel.org
Cc: Felix.Kuehling@amd.com, James.Bottomley@HansenPartnership.com,
airlied@redhat.com, akpm@linux-foundation.org,
alex.sierra@amd.com, alex@shazbot.org, apopple@nvidia.com,
ast@kernel.org, axelrasmussen@google.com, balbirs@nvidia.com,
baohua@kernel.org, baolin.wang@linux.alibaba.com,
baoquan.he@linux.dev, bigeasy@linutronix.de, byungchul@sk.com,
chengming.zhou@linux.dev, cl@gentwo.org, clrkwllms@kernel.org,
dave.jiang@intel.com, dave@stgolabs.net, dev.jain@arm.com,
djbw@kernel.org, gorcunov@gmail.com, gourry@gourry.net,
hagen@jauu.net, hao.li@linux.dev, harry@kernel.org,
hughd@google.com, jack@suse.cz, jannh@google.com, jgg@ziepe.ca,
jhubbard@nvidia.com, joshua.hahnjy@gmail.com, kas@kernel.org,
kasong@tencent.com, kraxel@redhat.com, lance.yang@linux.dev,
liam@infradead.org, linmiaohe@huawei.com,
linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-rt-devel@lists.linux.dev, ljs@kernel.org,
manfred@colorfullife.com, mason@kernel.org,
matthew.brost@intel.com, mgorman@suse.de, mhocko@suse.com,
muchun.song@linux.dev, nico.pache@linux.dev, osalvador@suse.de,
peterx@redhat.com, qi.zheng@linux.dev, rakie.kim@sk.com,
riel@surriel.com, rientjes@google.com, roman.gushchin@linux.dev,
rostedt@goodmis.org, rppt@kernel.org, ryan.roberts@arm.com,
shakeel.butt@linux.dev, shivankg@amd.com, shy828301@gmail.com,
sj@kernel.org, song@kernel.org, stevensd@chromium.org,
surenb@google.com, usama.arif@linux.dev, vbabka@kernel.org,
vivek.kasireddy@intel.com, wangkefeng.wang@huawei.com,
weixugc@google.com, willy@infradead.org, xu.xin@linux.dev,
ying.huang@linux.alibaba.com, yuanchu@google.com, ziy@nvidia.com,
zokeefe@google.com
Subject: Re: [PATCH 29/32] mm/ksm: use a migration counter to detect KSM folio migration
Date: Fri, 4 Dec 2026 09:54:09 +0800 [thread overview]
Message-ID: <20261204015409.492628-1-xu.xin@linux.dev> (raw)
In-Reply-To: <20261129-fixes_core_3-v1-29-f66094116801@kernel.org>
> ksm_get_folio() holds no reference on the folio referenced by
> stable_node->kpfn. If the folio at stable_node->kpfn is no longer our KSM
> folio, it was either freed or migrated. When freed, we can drop the
> stable node; when migrated, we have to look again for the migrated
> folio.
>
> However, a second migration might have migrated the KSM folio back to
> the very same page in the meantime: stable_node->kpfn would be
> effectively unchanged and the KSM folio is still alive.
>
> Consequently, we might remove the stable node of a KSM folio that is
> still mapped, resulting in a use-after-free of the stable node, for
> example, in rmap_walk_ksm().
>
> Let's fix it by storing a migration counter in the upper bits of
> stable_node->kpfn, incremented on each migration of the KSM folio. The
> existing check whether the value changed will then also detect a KSM
> folio that migrated back, and a freed KSM folio will still be detected
> as such.
>
> As a pfn never needs more than 64 - PAGE_SHIFT bits, convert
> stable_node->kpfn to a u64, and use the remaining PAGE_SHIFT bits (at
> least 12) for the counter. A wrap-around would require 4096 migrations
> of the KSM folio while ksmd is between two reads in ksm_get_folio():
> not relevant in practice, because even two migrations back and forth
> would be hard to hit.
>
> This change doesn't grow the size of a stable node on 64-bit, which is
> what we care about. We don't care about 32-bit and likely we should make
> KSM 64-bit-only soon.
>
> Note that on 32-bit, the pfn will always reside in the lower 32 bits,
> and every update changes the upper 32 bits, which hold the counter. So
> even if we read a value torn by a concurrent update (2x32-bit accesses),
> the pfn will be valid, and due to the existing barriers, the value
> cannot look unchanged after a migration.
>
> Rename stable_node->kpfn to stable_node->kpfn_seq to catch all users,
> and add helpers to access the pfn.
>
> This has low urgency, as it should be extremely hard to hit in practice.
> As this was not reproducible and wasn't reported so far, and the change
> is not trivial to backport, let's not CC stable.
Yes, It's very unlikely to happen and I have never met it at least.
>
> Fixes: c8d6553b9580 ("ksm: make KSM page migration possible")
> Reported-by: Chris Mason <mason@kernel.org>
> Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
> ---
> mm/ksm.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++-----------------
> 1 file changed, 66 insertions(+), 23 deletions(-)
>
Reviewed-by: Xu Xin (vivo) <xu.xin@linux.dev>
> diff --git a/mm/ksm.c b/mm/ksm.c
> index fe7b3b60540db..33c270aae3285 100644
> --- a/mm/ksm.c
> +++ b/mm/ksm.c
> @@ -152,10 +152,11 @@ struct ksm_scan {
> * @hlist_dup: linked into the stable_node->hlist with a stable_node chain
> * @list: linked into migrate_nodes, pending placement in the proper node tree
> * @hlist: hlist head of rmap_items using this ksm page
> - * @kpfn: page frame number of this ksm page (perhaps temporarily on wrong nid)
> + * @kpfn_seq: page frame number of this ksm page (perhaps temporarily on wrong
> + * nid), with a migration counter in the upper bits
> * @chain_prune_time: time of the last full garbage collection
> * @rmap_hlist_len: number of rmap_item entries in hlist or STABLE_NODE_CHAIN
> - * @nid: NUMA node id of stable tree in which linked (may not match kpfn)
> + * @nid: NUMA node id of stable tree in which linked (may not match the pfn)
> */
> struct ksm_stable_node {
> union {
> @@ -170,7 +171,7 @@ struct ksm_stable_node {
> };
> struct hlist_head hlist;
> union {
> - unsigned long kpfn;
> + u64 kpfn_seq;
> unsigned long chain_prune_time;
> };
> /*
> @@ -844,6 +845,39 @@ static struct page *get_mergeable_page(struct ksm_rmap_item *rmap_item)
> return page;
> }
>
> +/*
> + * The upper bits of stable_node->kpfn_seq count migrations of the ksm page, so
> + * ksm_get_folio() can detect a ksm page that migrated back to the same pfn.
> + */
> +#define KSM_KPFN_SEQ_SHIFT (64 - PAGE_SHIFT)
> +#define KSM_KPFN_PFN_MASK ((1ULL << KSM_KPFN_SEQ_SHIFT) - 1)
> +
> +static inline unsigned long ksm_kpfn_pfn(u64 kpfn_seq)
> +{
> + return kpfn_seq & KSM_KPFN_PFN_MASK;
> +}
> +
> +static inline unsigned long stable_node_pfn(const struct ksm_stable_node *node)
> +{
> + return ksm_kpfn_pfn(READ_ONCE(node->kpfn_seq));
> +}
> +
> +static inline void stable_node_init_pfn(struct ksm_stable_node *node,
> + unsigned long pfn)
> +{
> + node->kpfn_seq = pfn;
> +}
> +
> +static inline void stable_node_migrate_pfn(struct ksm_stable_node *node,
> + unsigned long pfn)
> +{
> + u64 kpfn_seq = node->kpfn_seq;
> +
> + kpfn_seq &= ~KSM_KPFN_PFN_MASK;
> + kpfn_seq += 1ULL << KSM_KPFN_SEQ_SHIFT;
> + WRITE_ONCE(node->kpfn_seq, kpfn_seq | pfn);
> +}
> +
> /*
> * This helper is used for getting right index into array of tree roots.
> * When merge_across_nodes knob is set to 1, there are only two rb-trees for
> @@ -855,6 +889,11 @@ static inline int get_kpfn_nid(unsigned long kpfn)
> return ksm_merge_across_nodes ? 0 : NUMA(pfn_to_nid(kpfn));
> }
>
> +static inline bool stable_node_nid_consistent(const struct ksm_stable_node *node)
> +{
> + return get_kpfn_nid(stable_node_pfn(node)) == NUMA(node->nid);
> +}
> +
> static struct ksm_stable_node *alloc_stable_node_chain(struct ksm_stable_node *dup,
> struct rb_root *root)
> {
> @@ -906,7 +945,8 @@ static void remove_node_from_stable_tree(struct ksm_stable_node *stable_node)
> hlist_for_each_entry(rmap_item, &stable_node->hlist, hlist) {
> if (rmap_item->hlist.next) {
> ksm_pages_sharing--;
> - trace_ksm_remove_rmap_item(stable_node->kpfn, rmap_item, rmap_item->mm);
> + trace_ksm_remove_rmap_item(stable_node_pfn(stable_node),
> + rmap_item, rmap_item->mm);
> } else {
> ksm_pages_shared--;
> }
> @@ -932,7 +972,7 @@ static void remove_node_from_stable_tree(struct ksm_stable_node *stable_node)
> BUILD_BUG_ON(STABLE_NODE_DUP_HEAD <= &migrate_nodes);
> BUILD_BUG_ON(STABLE_NODE_DUP_HEAD >= &migrate_nodes + 1);
>
> - trace_ksm_remove_ksm_page(stable_node->kpfn);
> + trace_ksm_remove_ksm_page(stable_node_pfn(stable_node));
> if (stable_node->head == &migrate_nodes)
> list_del(&stable_node->list);
> else
> @@ -969,13 +1009,13 @@ static struct folio *ksm_get_folio(struct ksm_stable_node *stable_node,
> {
> struct folio *folio;
> void *expected_mapping;
> - unsigned long kpfn;
> + u64 kpfn_seq;
>
> expected_mapping = (void *)((unsigned long)stable_node |
> FOLIO_MAPPING_KSM);
> again:
> - kpfn = READ_ONCE(stable_node->kpfn); /* Address dependency. */
> - folio = pfn_folio(kpfn);
> + kpfn_seq = READ_ONCE(stable_node->kpfn_seq); /* Address dependency. */
> + folio = pfn_folio(ksm_kpfn_pfn(kpfn_seq));
> if (READ_ONCE(folio->mapping) != expected_mapping)
> goto stale;
>
> @@ -1031,10 +1071,12 @@ static struct folio *ksm_get_folio(struct ksm_stable_node *stable_node,
> * We come here from above when folio->mapping or the swapcache flag
> * suggests that the node is stale; but it might be under migration.
> * We need smp_rmb(), matching the smp_wmb() in folio_migrate_ksm(),
> - * before checking whether node->kpfn has been changed.
> + * before checking whether node->kpfn_seq has been changed. Due to the
> + * migration counter, a ksm page that migrated back to the same pfn
> + * changes node->kpfn_seq as well.
> */
> smp_rmb();
> - if (READ_ONCE(stable_node->kpfn) != kpfn)
> + if (READ_ONCE(stable_node->kpfn_seq) != kpfn_seq)
> goto again;
> remove_node_from_stable_tree(stable_node);
> return NULL;
> @@ -1984,8 +2026,7 @@ static struct folio *stable_tree_search(struct page *page)
> goto again;
> folio_unlock(tree_folio);
>
> - if (get_kpfn_nid(stable_node_dup->kpfn) !=
> - NUMA(stable_node_dup->nid)) {
> + if (!stable_node_nid_consistent(stable_node_dup)) {
> folio_put(tree_folio);
> goto replace;
> }
> @@ -2149,7 +2190,7 @@ static struct ksm_stable_node *stable_tree_insert(struct folio *kfolio)
> return NULL;
>
> INIT_HLIST_HEAD(&stable_node_dup->hlist);
> - stable_node_dup->kpfn = kpfn;
> + stable_node_init_pfn(stable_node_dup, kpfn);
> stable_node_dup->rmap_hlist_len = 0;
> DO_NUMA(stable_node_dup->nid = nid);
> if (!need_chain) {
> @@ -2316,8 +2357,7 @@ static void cmp_and_merge_page(struct page *page, struct ksm_rmap_item *rmap_ite
> stable_node = folio_stable_node(folio);
> if (stable_node) {
> if (stable_node->head != &migrate_nodes &&
> - get_kpfn_nid(READ_ONCE(stable_node->kpfn)) !=
> - NUMA(stable_node->nid)) {
> + !stable_node_nid_consistent(stable_node)) {
> stable_node_dup_del(stable_node);
> stable_node->head = &migrate_nodes;
> list_add(&stable_node->list, stable_node->head);
> @@ -3416,11 +3456,12 @@ void folio_migrate_ksm(struct folio *newfolio, struct folio *folio)
>
> stable_node = folio_stable_node(folio);
> if (stable_node) {
> - VM_BUG_ON_FOLIO(stable_node->kpfn != folio_pfn(folio), folio);
> - WRITE_ONCE(stable_node->kpfn, folio_pfn(newfolio));
> + VM_BUG_ON_FOLIO(stable_node_pfn(stable_node) !=
> + folio_pfn(folio), folio);
> + stable_node_migrate_pfn(stable_node, folio_pfn(newfolio));
> /*
> * newfolio->mapping was set in advance; now we need smp_wmb()
> - * to make sure that the new stable_node->kpfn is visible
> + * to make sure that the new stable_node->kpfn_seq is visible
> * to ksm_get_folio() before it can see that folio->mapping
> * has gone stale (or that the swapcache flag has been cleared).
> */
> @@ -3445,11 +3486,12 @@ static bool stable_node_dup_remove_range(struct ksm_stable_node *stable_node,
> unsigned long start_pfn,
> unsigned long end_pfn)
> {
> - if (stable_node->kpfn >= start_pfn &&
> - stable_node->kpfn < end_pfn) {
> + const unsigned long pfn = stable_node_pfn(stable_node);
> +
> + if (pfn >= start_pfn && pfn < end_pfn) {
> /*
> * Don't ksm_get_folio, page has already gone:
> - * which is why we keep kpfn instead of page*
> + * which is why we keep the pfn instead of page*
> */
> remove_node_from_stable_tree(stable_node);
> return true;
> @@ -3505,8 +3547,9 @@ static void ksm_check_stable_tree(unsigned long start_pfn,
> }
> }
> list_for_each_entry_safe(stable_node, next, &migrate_nodes, list) {
> - if (stable_node->kpfn >= start_pfn &&
> - stable_node->kpfn < end_pfn)
> + const unsigned long pfn = stable_node_pfn(stable_node);
> +
> + if (pfn >= start_pfn && pfn < end_pfn)
> remove_node_from_stable_tree(stable_node);
> cond_resched();
> }
>
> --
> 2.56.1
>
next prev parent reply other threads:[~2026-12-04 1:54 UTC|newest]
Thread overview: 134+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 10:06 [PATCH 00/32] mm: various (urgent?) fixes, part 3 David Hildenbrand (Arm)
2026-11-29 10:06 ` [PATCH 01/32] mm/shmem: count only the swapped pages in the requested range David Hildenbrand (Arm)
2026-11-30 3:41 ` Zi Yan
2026-12-01 9:42 ` David Hildenbrand (Arm)
2026-12-01 13:47 ` Gregory Price (Meta)
2026-12-02 7:29 ` Baolin Wang
2026-12-02 15:22 ` David Hildenbrand (Arm)
2026-11-29 10:06 ` [PATCH 02/32] mm/shmem: don't skip parts of a split swap entry when punching holes David Hildenbrand (Arm)
2026-12-02 11:46 ` Baolin Wang
2026-12-02 21:25 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 03/32] mm/shmem: reject userfaultfd fills during hole punch David Hildenbrand (Arm)
2026-11-29 19:47 ` Jose A. Perez de Azpillaga
2026-12-01 9:45 ` David Hildenbrand (Arm)
2026-12-02 11:25 ` Baolin Wang
2026-12-01 13:49 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 04/32] mm/shmem: fix commit limit bypass with very large shmem sizes David Hildenbrand (Arm)
2026-11-30 22:39 ` Gregory Price (Meta)
2026-12-02 8:31 ` Baolin Wang
2026-11-29 10:06 ` [PATCH 05/32] mm/shmem: don't pin inodes with eviction held off in the huge shrinker David Hildenbrand (Arm)
2026-12-02 8:47 ` Baolin Wang
2026-12-02 21:29 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 06/32] mm/shmem: seal the size of SysV and shared anon files David Hildenbrand (Arm)
2026-11-30 22:41 ` Gregory Price (Meta)
2026-12-02 8:58 ` Baolin Wang
2026-12-02 13:31 ` Christian Brauner
2026-11-29 10:06 ` [PATCH 07/32] mm/khugepaged: check the VMA before walking page tables when collapsing David Hildenbrand (Arm)
2026-11-29 19:55 ` Jose A. Perez de Azpillaga
2026-11-30 16:31 ` Zi Yan
2026-12-02 5:18 ` Dev Jain
2026-12-02 15:23 ` David Hildenbrand (Arm)
2026-12-02 5:29 ` Gregory Price (Meta)
2026-12-02 9:07 ` Baolin Wang
2026-11-29 10:06 ` [PATCH 08/32] mm/khugepaged: flush file after unlocking folios in collapse_file() David Hildenbrand (Arm)
2026-11-29 19:58 ` Jose A. Perez de Azpillaga
2026-11-30 17:02 ` Zi Yan
2026-12-02 9:13 ` Baolin Wang
2026-12-02 21:32 ` Gregory Price (Meta)
2026-12-02 21:39 ` David Hildenbrand (Arm)
2026-11-29 10:06 ` [PATCH 09/32] mm/khugepaged: check for uffd outside the i_pages lock David Hildenbrand (Arm)
2026-11-29 20:07 ` Jose A. Perez de Azpillaga
2026-12-02 5:36 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 10/32] mm/khugepaged: don't wait for userfaultfd David Hildenbrand (Arm)
2026-11-29 20:16 ` Jose A. Perez de Azpillaga
2026-12-01 9:51 ` David Hildenbrand (Arm)
2026-12-02 21:57 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 11/32] mm/khugepaged: store new folio before adding it to LRU David Hildenbrand (Arm)
2026-11-29 20:22 ` Jose A. Perez de Azpillaga
2026-11-30 17:12 ` Zi Yan
2026-12-02 9:19 ` Baolin Wang
2026-12-02 22:05 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 12/32] mm/khugepaged: check PMD support with the folios locked David Hildenbrand (Arm)
2026-11-29 20:27 ` Jose A. Perez de Azpillaga
2026-11-30 17:13 ` Zi Yan
2026-12-02 9:42 ` Baolin Wang
2026-12-02 15:29 ` David Hildenbrand (Arm)
2026-12-02 21:41 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 13/32] mm/khugepaged: stop MADV_COLLAPSE on a fatal signal David Hildenbrand (Arm)
2026-11-29 20:29 ` Jose A. Perez de Azpillaga
2026-11-30 17:13 ` Zi Yan
2026-12-02 5:37 ` Gregory Price (Meta)
2026-12-02 15:30 ` David Hildenbrand (Arm)
2026-12-02 9:22 ` Baolin Wang
2026-12-03 13:55 ` Dev Jain
2026-11-29 10:06 ` [PATCH 14/32] mm/huge_memory: split huge zero PMDs on unshare faults David Hildenbrand (Arm)
2026-11-29 20:33 ` Jose A. Perez de Azpillaga
2026-12-01 13:51 ` Gregory Price (Meta)
2026-12-02 15:31 ` David Hildenbrand (Arm)
2026-12-02 1:16 ` Zi Yan
2026-11-29 10:06 ` [PATCH 15/32] mm/huge_memory: don't map huge PFN entries if the arch restricts PFNs David Hildenbrand (Arm)
2026-11-29 20:41 ` Jose A. Perez de Azpillaga
2026-12-01 9:54 ` David Hildenbrand (Arm)
2026-12-01 12:02 ` Jose A. Perez de Azpillaga
2026-11-29 10:06 ` [PATCH 16/32] mm/memory: don't clear a PUD leaf as bad in a zap David Hildenbrand (Arm)
2026-11-29 20:47 ` Jose A. Perez de Azpillaga
2026-11-29 10:06 ` [PATCH 17/32] mm/memory: drop the swap device ref before do_wp_page() David Hildenbrand (Arm)
2026-11-29 20:50 ` Jose A. Perez de Azpillaga
2026-12-01 13:52 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 18/32] mm: consistently check MMF_UNSTABLE when populating in CoW mappings David Hildenbrand (Arm)
2026-11-29 20:58 ` Jose A. Perez de Azpillaga
2026-12-02 21:46 ` Gregory Price (Meta)
2026-12-02 22:38 ` David Hildenbrand (Arm)
2026-11-29 10:06 ` [PATCH 19/32] mm/gup: check for fatal signals in memfd_pin_folios() David Hildenbrand (Arm)
2026-12-02 5:52 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 20/32] mm/migrate_device: don't collect secretmem pages David Hildenbrand (Arm)
2026-12-01 13:54 ` Gregory Price (Meta)
2026-12-02 4:03 ` Alistair Popple
2026-12-02 15:32 ` David Hildenbrand (Arm)
2026-11-29 10:06 ` [PATCH 21/32] mm/migrate_device: mark folios leaving device memory dirty David Hildenbrand (Arm)
2026-12-01 13:55 ` Gregory Price (Meta)
2026-12-02 4:15 ` Alistair Popple
2026-12-02 15:34 ` David Hildenbrand (Arm)
2026-12-02 22:31 ` Alistair Popple
2026-12-02 9:38 ` Balbir Singh
2026-11-29 10:06 ` [PATCH 22/32] mm: taint device sections before setting subsections valid David Hildenbrand (Arm)
2026-11-29 10:06 ` [PATCH 23/32] mm/mempolicy: check access under exec_update_lock David Hildenbrand (Arm)
2026-11-30 18:14 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 24/32] mm/mempolicy: reject an empty set of allowed nodes David Hildenbrand (Arm)
2026-11-30 15:46 ` Joshua Hahn
2026-11-30 18:05 ` Gregory Price (Meta)
2026-12-02 5:55 ` Gregory Price (Meta)
2026-12-02 15:36 ` David Hildenbrand (Arm)
2026-11-29 10:06 ` [PATCH 25/32] mm/mempolicy: don't wait for mems_allowed_seq in kmalloc_nolock() David Hildenbrand (Arm)
2026-11-29 21:27 ` Jose A. Perez de Azpillaga
2026-11-30 15:55 ` Joshua Hahn
2026-12-01 9:40 ` David Hildenbrand (Arm)
2026-12-02 18:57 ` Joshua Hahn
2026-11-30 18:12 ` Gregory Price (Meta)
2026-12-01 9:39 ` David Hildenbrand (Arm)
2026-12-01 11:44 ` Vlastimil Babka (SUSE)
2026-12-01 11:58 ` David Hildenbrand (Arm)
2026-12-01 14:00 ` Gregory Price (Meta)
2026-12-01 15:02 ` David Hildenbrand (Arm)
2026-12-02 8:10 ` Vlastimil Babka (SUSE)
2026-12-01 13:13 ` Harry Yoo
2026-12-01 13:59 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 26/32] mm/ksm: look up the folio again in cmp_and_merge_page() David Hildenbrand (Arm)
2026-12-02 21:50 ` Gregory Price (Meta)
2026-11-29 10:06 ` [PATCH 27/32] mm/ksm: copy KSM folios at swap-in without VM_MERGEABLE David Hildenbrand (Arm)
2026-12-01 14:56 ` Gregory Price (Meta)
2026-12-01 15:01 ` David Hildenbrand (Arm)
2026-11-29 10:06 ` [PATCH 28/32] mm/ksm: don't convert a shared anon folio into a KSM folio David Hildenbrand (Arm)
2026-11-29 10:07 ` [PATCH 29/32] mm/ksm: use a migration counter to detect KSM folio migration David Hildenbrand (Arm)
2026-12-03 5:27 ` Gregory Price (Meta)
2026-12-03 12:36 ` David Hildenbrand (Arm)
2026-12-04 1:54 ` Xu Xin (vivo) [this message]
2026-11-29 10:07 ` [PATCH 30/32] mm/migrate: fix KSM oddity by checking expected refcount without mappings David Hildenbrand (Arm)
2026-12-02 17:00 ` Zi Yan
2026-12-02 18:41 ` David Hildenbrand (Arm)
2026-11-29 10:07 ` [PATCH 31/32] mm/migrate_device: don't collect KSM folios David Hildenbrand (Arm)
2026-12-02 9:43 ` Balbir Singh
2026-12-02 21:55 ` Gregory Price (Meta)
2026-12-02 22:47 ` Alistair Popple
2026-11-29 10:07 ` [PATCH 32/32] mm/migrate: use consistent folio locking logic David Hildenbrand (Arm)
2026-12-02 15:37 ` [PATCH 00/32] mm: various (urgent?) fixes, part 3 David Hildenbrand (Arm)
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=20261204015409.492628-1-xu.xin@linux.dev \
--to=xu.xin@linux.dev \
--cc=Felix.Kuehling@amd.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=airlied@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=alex.sierra@amd.com \
--cc=alex@shazbot.org \
--cc=apopple@nvidia.com \
--cc=ast@kernel.org \
--cc=axelrasmussen@google.com \
--cc=balbirs@nvidia.com \
--cc=baohua@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=baoquan.he@linux.dev \
--cc=bigeasy@linutronix.de \
--cc=byungchul@sk.com \
--cc=chengming.zhou@linux.dev \
--cc=cl@gentwo.org \
--cc=clrkwllms@kernel.org \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=djbw@kernel.org \
--cc=gorcunov@gmail.com \
--cc=gourry@gourry.net \
--cc=hagen@jauu.net \
--cc=hao.li@linux.dev \
--cc=harry@kernel.org \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=jannh@google.com \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=joshua.hahnjy@gmail.com \
--cc=kas@kernel.org \
--cc=kasong@tencent.com \
--cc=kraxel@redhat.com \
--cc=lance.yang@linux.dev \
--cc=liam@infradead.org \
--cc=linmiaohe@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=ljs@kernel.org \
--cc=manfred@colorfullife.com \
--cc=mason@kernel.org \
--cc=matthew.brost@intel.com \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=nico.pache@linux.dev \
--cc=osalvador@suse.de \
--cc=peterx@redhat.com \
--cc=qi.zheng@linux.dev \
--cc=rakie.kim@sk.com \
--cc=riel@surriel.com \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=shakeel.butt@linux.dev \
--cc=shivankg@amd.com \
--cc=shy828301@gmail.com \
--cc=sj@kernel.org \
--cc=song@kernel.org \
--cc=stevensd@chromium.org \
--cc=surenb@google.com \
--cc=usama.arif@linux.dev \
--cc=vbabka@kernel.org \
--cc=vivek.kasireddy@intel.com \
--cc=wangkefeng.wang@huawei.com \
--cc=weixugc@google.com \
--cc=willy@infradead.org \
--cc=ying.huang@linux.alibaba.com \
--cc=yuanchu@google.com \
--cc=ziy@nvidia.com \
--cc=zokeefe@google.com \
/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