mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: xu.xin16@zte.com.cn
Cc: akpm@linux-foundation.org, david@kernel.org, ljs@kernel.org,
	surenb@google.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, chengming.zhou@linux.dev
Subject: Re: [PATCH 3/4] mm/ksm: make break_ksm() more scalable
Date: Sun, 13 Sep 2026 05:42:47 +0100	[thread overview]
Message-ID: <aqYpx0hYUbcKKVYp@casper.infradead.org> (raw)
In-Reply-To: <20260911161210082WKOqK1dumByDY7jeEOdPF@zte.com.cn>

On Fri, Sep 11, 2026 at 04:12:10PM +0800, xu.xin16@zte.com.cn wrote:
> +++ b/mm/ksm.c
> @@ -660,16 +660,11 @@ static int break_ksm_pmd_entry(pmd_t *pmdp, unsigned long addr, unsigned long en
>  	return found;
>  }
> 
> -static const struct mm_walk_ops break_ksm_ops = {
> +static struct mm_walk_ops break_ksm_ops = {
>  	.pmd_entry = break_ksm_pmd_entry,
>  	.walk_lock = PGWALK_RDLOCK,
>  };

Absolutely not.  This is a struct full of function pointers, and
you're making it modifiable.  That makes it a big juicy target for
attackers to find and exploit.

  parent reply	other threads:[~2026-09-13  4:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11  8:04 [PATCH 0/4] mm/ksm: use per-VMA locking for find_mergeable_vma() xu.xin16
2026-09-11  8:07 ` [PATCH 1/4] mm/pagewalk: delete the unused member xu.xin16
2026-09-11  8:56   ` Lorenzo Stoakes (ARM)
2026-09-11  9:07     ` xu.xin16
2026-09-11  8:09 ` [PATCH 2/4] mm: make folio_walk_start()'s locking asserts scalable xu.xin16
2026-09-11  9:14   ` xu.xin16
2026-09-11  8:12 ` [PATCH 3/4] mm/ksm: make break_ksm() more scalable xu.xin16
2026-09-11  9:04   ` Lorenzo Stoakes (ARM)
2026-09-13  4:42   ` Matthew Wilcox [this message]
2026-09-11  8:13 ` [PATCH 4/4] mm/ksm: add find_mergeable_vma_locked() to use per-VMA locking xu.xin16
2026-09-11  8:22   ` Test Case Code " xu.xin16
2026-09-11  9:12   ` xu.xin16
2026-09-14  2:09   ` Longlong Xia
2026-09-14  2:38     ` xu.xin16
2026-09-11  8:47 ` [PATCH 0/4] mm/ksm: use per-VMA locking for find_mergeable_vma() Jinjiang Tu
2026-09-13  4:17   ` xu.xin16
2026-09-14  3:03     ` Jinjiang Tu
2026-09-14  3:09       ` Jinjiang Tu
2026-09-24  3:40         ` xu.xin16
2026-09-17  9:59     ` David Hildenbrand (Arm)
2026-09-12  8:24 ` [PATCH RFC 0/3] mm/ksm: scan with per-VMA locks Longlong Xia
2026-09-12  8:24   ` [PATCH RFC 1/3] mm/pagewalk: allow folio_walk_start() under a vma read lock Longlong Xia
2026-09-12  8:24   ` [PATCH RFC 2/3] mm/ksm: use the VMA lock when looking up mergeable pages Longlong Xia
2026-09-12  8:24   ` [PATCH RFC 3/3] mm/ksm: scan VMAs with per-VMA locks Longlong Xia
2026-09-13  4:37   ` [PATCH RFC 0/3] mm/ksm: scan " xu.xin16

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=aqYpx0hYUbcKKVYp@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=david@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=surenb@google.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

all inboxes | Powered by JetHome®