[PATCH 0/2] mm: vmalloc: Actually use the in-place vrealloc region

Kees Cook posted 2 patches 7 months, 1 week ago
mm/vmalloc.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
[PATCH 0/2] mm: vmalloc: Actually use the in-place vrealloc region
Posted by Kees Cook 7 months, 1 week ago
Hi,

This fixes a performance regression[1] with vrealloc(). This needs to
get into v6.15, which is where the regression originates, and then it'll
get backport to the -stable releases as well.

Thanks!

-Kees

[1] https://lore.kernel.org/lkml/20250515-bpf-verifier-slowdown-vwo2meju4cgp2su5ckj@6gi6ssxbnfqg/

Kees Cook (2):
  mm: vmalloc: Actually use the in-place vrealloc region
  mm: vmalloc: Only zero-init on vrealloc shrink

 mm/vmalloc.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

-- 
2.34.1
Re: [PATCH 0/2] mm: vmalloc: Actually use the in-place vrealloc region
Posted by Kees Cook 7 months ago
On Thu, May 15, 2025 at 02:42:14PM -0700, Kees Cook wrote:
> This fixes a performance regression[1] with vrealloc(). This needs to
> get into v6.15, which is where the regression originates, and then it'll
> get backport to the -stable releases as well.

Andrew, can you get these to Linus this week? I can also send them his
way if you'd rather?

-Kees

-- 
Kees Cook
Re: [PATCH 0/2] mm: vmalloc: Actually use the in-place vrealloc region
Posted by Andrew Morton 7 months ago
On Mon, 19 May 2025 12:18:42 -0700 Kees Cook <kees@kernel.org> wrote:

> On Thu, May 15, 2025 at 02:42:14PM -0700, Kees Cook wrote:
> > This fixes a performance regression[1] with vrealloc(). This needs to
> > get into v6.15, which is where the regression originates, and then it'll
> > get backport to the -stable releases as well.

No -stable backporting will be needed?

> Andrew, can you get these to Linus this week?

Sure.
Re: [PATCH 0/2] mm: vmalloc: Actually use the in-place vrealloc region
Posted by Kees Cook 7 months ago
On Mon, May 19, 2025 at 05:06:07PM -0700, Andrew Morton wrote:
> On Mon, 19 May 2025 12:18:42 -0700 Kees Cook <kees@kernel.org> wrote:
> 
> > On Thu, May 15, 2025 at 02:42:14PM -0700, Kees Cook wrote:
> > > This fixes a performance regression[1] with vrealloc(). This needs to
> > > get into v6.15, which is where the regression originates, and then it'll
> > > get backport to the -stable releases as well.
> 
> No -stable backporting will be needed?

I think it will, since the vrealloc patches were backported
automatically, e.g. in v6.14.y: 0b391a520b4e ("mm: vmalloc: support more
granular vrealloc() sizing")

> > Andrew, can you get these to Linus this week?
> 
> Sure.

Thanks!

-- 
Kees Cook
Re: [PATCH 0/2] mm: vmalloc: Actually use the in-place vrealloc region
Posted by Danilo Krummrich 7 months, 1 week ago
On Thu, May 15, 2025 at 02:42:14PM -0700, Kees Cook wrote:
> Hi,
> 
> This fixes a performance regression[1] with vrealloc(). This needs to
> get into v6.15, which is where the regression originates, and then it'll
> get backport to the -stable releases as well.

Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Re: [PATCH 0/2] mm: vmalloc: Actually use the in-place vrealloc region
Posted by Uladzislau Rezki 7 months, 1 week ago
On Thu, May 15, 2025 at 02:42:14PM -0700, Kees Cook wrote:
> Hi,
> 
> This fixes a performance regression[1] with vrealloc(). This needs to
> get into v6.15, which is where the regression originates, and then it'll
> get backport to the -stable releases as well.
> 
> Thanks!
> 
> -Kees
> 
> [1] https://lore.kernel.org/lkml/20250515-bpf-verifier-slowdown-vwo2meju4cgp2su5ckj@6gi6ssxbnfqg/
> 
> Kees Cook (2):
>   mm: vmalloc: Actually use the in-place vrealloc region
>   mm: vmalloc: Only zero-init on vrealloc shrink
> 
>  mm/vmalloc.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
Looks good to me both.

Reviewed-by: "Uladzislau Rezki (Sony)" <urezki@gmail.com>

--
Uladzislau Rezki
Re: [PATCH 0/2] mm: vmalloc: Actually use the in-place vrealloc region
Posted by Shung-Hsi Yu 7 months, 1 week ago
On Thu, May 15, 2025 at 02:42:14PM -0700, Kees Cook wrote:
> Hi,
> 
> This fixes a performance regression[1] with vrealloc(). This needs to
> get into v6.15, which is where the regression originates, and then it'll
> get backport to the -stable releases as well.
> 
> Thanks!
> 
> -Kees
> 
> [1] https://lore.kernel.org/lkml/20250515-bpf-verifier-slowdown-vwo2meju4cgp2su5ckj@6gi6ssxbnfqg/
> 
> Kees Cook (2):
>   mm: vmalloc: Actually use the in-place vrealloc region
>   mm: vmalloc: Only zero-init on vrealloc shrink

Thank you for the prompt fix! I'll remember to include a more thorough
note on reproducing the issue next time.

With the patchset applied, BPF selftests on both 6.15-rc6 and 6.14.7-rc2
passes successfully.

Tested-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>