[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250424085331.GD19534@noisy.programming.kicks-ass.net>
Date: Thu, 24 Apr 2025 10:53:31 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Mike Rapoport <rppt@...nel.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?
It should not -- currently all this code is used with PAGE_SIZE
multiples and everything just works. But whilst I was perusing this
code, I noticed that nothing actually enforced this. If someone were to
break this assumption things will go sideways.
Powered by blists - more mailing lists