Re: [PATCH v2] mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default

From: Andrew Morton
Date: Tue Jun 11 2024 - 22:43:20 EST


On Tue, 11 Jun 2024 21:35:24 -0400 Rafael Aquini <aquini@xxxxxxxxxx> wrote:

> > Shouldn't we make this the default (at least for 32-bit) so the
> > regressed kernels are fixed simply by applying this patch?
> >
>
> That is a fair take, indeed. I guess we could do something like
>
> config FORCE_MAX_MMAP_RND_BITS
> bool "Force maximum number of bits to use for ASLR of mmap base address"
> - default n
> + default y if !64BIT

"something like" != "exhaustively tested" ;)

I'll toss that in there, but please do let me know when it is suitable
for an upstream merge.

I also added cc:stable.