All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] execmem: enforce allocation size aligment to PAGE_SIZE
Date: Thu, 24 Apr 2025 08:50:40 +0300	[thread overview]
Message-ID: <aAnRMGGaytI3ELMu@kernel.org> (raw)
In-Reply-To: <20250423143650.6595dcc7178351b62c31782c@linux-foundation.org>

On Wed, Apr 23, 2025 at 02:36:50PM -0700, Andrew Morton wrote:
> On Wed, 23 Apr 2025 17:48:07 +0300 Mike Rapoport <rppt@kernel.org> wrote:
> 
> > Before introduction of ROX cache execmem allocation size was always
> > implicitly aligned to PAGE_SIZE inside vmalloc.
> > 
> > However, when allocation happens from the ROX cache, this is not
> > enforced.
> > 
> > Make sure that the allocation size is always consistently aligned to
> > PAGE_SIZE.
> 
> Does this have any known runtime effect?

Right now it'll make the maple trees in execmem_cache more compact.
And it's a precaution for the case when execmem callers would want to
change permissions on unaligned range because that would WARN_ON() loudly.

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2025-04-24  5:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 14:48 [PATCH] execmem: enforce allocation size aligment to PAGE_SIZE Mike Rapoport
2025-04-23 14:56 ` Peter Zijlstra
2025-04-23 21:36 ` Andrew Morton
2025-04-24  5:50   ` Mike Rapoport [this message]
2025-04-24  8:53   ` Peter Zijlstra

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=aAnRMGGaytI3ELMu@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.