[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aAnRMGGaytI3ELMu@kernel.org>
Date: Thu, 24 Apr 2025 08:50:40 +0300
From: Mike Rapoport <rppt@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] execmem: enforce allocation size aligment to PAGE_SIZE
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@...nel.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.
Powered by blists - more mailing lists