On Thu, Oct 15, 2026 at 05:35:00PM +0100, Catalin Marinas wrote: > On Wed, Oct 14, 2026 at 10:23:35PM -0700, Iurii Trukhin wrote: > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > > index cab741a695f5..7bca47269dd5 100644 > > --- a/arch/arm64/Kconfig > > +++ b/arch/arm64/Kconfig > > @@ -313,6 +313,14 @@ config ARCH_MMAP_RND_BITS_MAX > > default 16 if ARM64_16K_PAGES > > default 18 > > > > +# default to 1 TiB (5 bits below ARCH_MMAP_RND_BITS_MAX) on 48-bit and > > +# 52-bit VA; smaller VA sizes fall back to ARCH_MMAP_RND_BITS_MIN in > > +# arch/Kconfig > > +config ARCH_MMAP_RND_BITS > > + default 24 if (ARM64_VA_BITS=48 || ARM64_VA_BITS=52) && ARM64_64K_PAGES > > + default 26 if (ARM64_VA_BITS=48 || ARM64_VA_BITS=52) && ARM64_16K_PAGES > > + default 28 if (ARM64_VA_BITS=48 || ARM64_VA_BITS=52) > > This looks fine but I was wondering what ARCH_MMAP_RND_BITS_DEFAULT (and > the compat equivalent) is for. It turns out that an int always evaluates > to 'n', so not taken into account. It might be worth removing them > altogether as a separate patch. No-one seems to be using them.
I had the same observation looking into v7.3-rc7 but seems like that option is already being removed via the following patch, already in next-20261015. commit 8cdae75cebe06b8abea9cd3402442d47cf50b485 Author: Julian Braha <[email protected]> Date: Mon Aug 31 00:00:16 2026 +0100 arch/Kconfig: fix dead conditions by removing dead options These two 'int' options: ARCH_MMAP_RND_BITS_DEFAULT ARCH_MMAP_RND_COMPAT_BITS_DEFAULT [---snip---] https://lore.kernel.org/all/[email protected]/ > > -- > Catalin

