[PATCH] arm64/mm: Limit ARCH_MMAP_RND_BITS_MAX to 24 for 42-bit VA

Catalin Marinas catalin.marinas at arm.com
Thu Nov 26 09:56:22 PST 2026


On Wed, Nov 11, 2026 at 09:50:27AM +0530, Anshuman Khandual wrote:
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 1075bc661833..8d8b1331178a 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -300,7 +300,7 @@ config ARCH_MMAP_RND_BITS_MIN
>  config ARCH_MMAP_RND_BITS_MAX
>  	default 19 if ARM64_VA_BITS=36
>  	default 24 if ARM64_VA_BITS=39
> -	default 27 if ARM64_VA_BITS=42
> +	default 24 if ARM64_VA_BITS=42

Why not 23? The comment above this config entry was meant say it's
calculated as VA_BITS - PAGE_SHIFT - 3 since commit 8f0d3aa9de57
("arm64: mm: support ARCH_MMAP_RND_BITS"). However, you changed it to
"... + 3" with commit 51ecb29f7a65 ("arm64/mm: Define PTDESC_ORDER"), so
you may want to fix the comment as well with this patch.

-- 
Catalin



More information about the linux-arm-kernel mailing list