Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hajime Tazaki <thehajime@gmail.com>
To: akpm@linux-foundation.org
Cc: liam@infradead.org, ljs@kernel.org, vbabka@kernel.org,
	jannh@google.com, pfalcato@suse.de, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: nommu: add sysctl_max_map_count() check for do_mmap()
Date: Mon, 06 Jul 2026 09:19:02 +0900	[thread overview]
Message-ID: <m2se5xt1ft.wl-thehajime@gmail.com> (raw)
In-Reply-To: <20260705151512.5edabd9bb5d11cb6f1c6309f@linux-foundation.org>


On Mon, 06 Jul 2026 07:15:12 +0900,
Andrew Morton wrote:
> 
> On Thu,  2 Jul 2026 10:28:30 +0900 Hajime Tazaki <thehajime@gmail.com> wrote:
> 
> > The sysctl variable vm.max_map_count (sysctl_max_map_count) is not
> > expose under !MMU case but used it wit the default vaule
> > DEFAULT_MAX_MAP_COUNT as a limit of count.  This is currently used when
> > a vma entry is split into two chunks (split_vma()) but not used when
> > allocated (do_mmap()).  As a result, even if users request a large
> > number of allocate memory, it will keep allocating until OOM happens.
> > 
> > This commit introduces a check at the begining of do_mmap in nommu.c to
> > prevent this situation.
> > 
> > This is detected with a LTP (Linux Test Project) test, which linked
> > below.
> 
> AI review flagged a couple of issues in the current code, one quite
> serious:
> 
> https://sashiko.dev/#/patchset/20260702012830.667205-1-thehajime@gmail.com

I will follow up with another patch for the issue detected here.

btw, I found (and sashiko also detected) several typos for this
particular patch.  Can I send v2 patch with the additional fix, or do
you prefer that I'll only send the additional patch ?

anyway, thanks for your time to look at this.

-- Hajime



  reply	other threads:[~2026-07-06  0:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260702012830.667205-1-thehajime@gmail.com>
2026-07-05 22:10 ` [PATCH] mm: nommu: add sysctl_max_map_count() check for do_mmap() Andrew Morton
2026-07-05 22:15 ` Andrew Morton
2026-07-06  0:19   ` Hajime Tazaki [this message]
2026-07-06  0:44     ` Andrew Morton
2026-07-06  2:03       ` Hajime Tazaki

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=m2se5xt1ft.wl-thehajime@gmail.com \
    --to=thehajime@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jannh@google.com \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=pfalcato@suse.de \
    --cc=vbabka@kernel.org \
    /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