mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnav Kansal <rnv@google.com>
To: rppt@kernel.org
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	 linux-mm@kvack.org, mcgrof@kernel.org, rnv@google.com,
	rohakum@google.com,  stable@vger.kernel.org
Subject: Re: [PATCH] mm/execmem: only free ROX cache vm_struct when fully unused
Date: Thu, 15 Oct 2026 06:37:22 -0700	[thread overview]
Message-ID: <20261015133722.2351642-1-rnv@google.com> (raw)
In-Reply-To: <atCKXeWnVAWvhSn0@kernel.org>

On Thu, Oct 15, 2026 at 11:10:05AM +0300, Mike Rapoport wrote:
> On Wed, Oct 14, 2026 at 04:30:58PM -0700, Arnav Kansal wrote:
> > execmem_cache_clean() currently uses:
> > 
> >     IS_ALIGNED(size, PMD_SIZE) && IS_ALIGNED(mas.index, PMD_SIZE)
> 
> This is not the case anymore:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/mm/execmem.c?id=569db54d8b7a4ec463a62c444de0d6f5f10e9dc1

Thanks for the pointer, Mike! We had checked Linus's tree (v7.3-rc6) and
missed that your series ("mm/execmem: fixes and cleanups for the ROX
cache") was already queued in akpm/mm.git.

Commit 52d95a55a011 ("mm/execmem: free ROX cache chunks only when they
span an entire vm area") and 569db54d8b7a completely cover this, so
please drop our patch.

As a data point, we hit the exact multi-PMD premature vfree() from
52d95a55a011 in production (on 6.18.y) when a large module (> 6 MiB of
.text) failed initialization and unloaded after a smaller module
(kvm.ko) had been allocated out of the tail of the same 8 MiB vm_struct,
so having 52d95a55a011 tagged for stable is much appreciated.

Thanks,
Arnav

      reply	other threads:[~2026-10-15 13:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14 23:30 Arnav Kansal
2026-10-15  8:10 ` Mike Rapoport
2026-10-15 13:37   ` Arnav Kansal [this message]

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=20261015133722.2351642-1-rnv@google.com \
    --to=rnv@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    --cc=rohakum@google.com \
    --cc=rppt@kernel.org \
    --cc=stable@vger.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

all inboxes | Powered by JetHome®