All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Arnd Bergmann" <arnd@kernel.org>, linux-mm@kvack.org
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Andreas Larsson" <andreas@gaisler.com>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"David Hildenbrand (Arm)" <david@kernel.org>,
	"Jason Gunthorpe" <jgg@nvidia.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Lorenzo Stoakes (ARM)" <ljs@kernel.org>,
	"Matthew Wilcox" <willy@infradead.org>,
	"Malin Jonsson" <malin.jonsson@est.tech>,
	"Richard Weinberger" <richard@nod.at>,
	"Russell King" <linux@armlinux.org.uk>,
	x86@kernel.org
Subject: Re: [PATCH v2 6/6] ARM: add CONFIG_VMSPLIT_2G_OPT option
Date: Fri, 13 Nov 2026 11:26:53 +0000	[thread overview]
Message-ID: <sashiko-outbox-212720@kernel.org> (raw)
In-Reply-To: <20261112112528.1116405-7-arnd@kernel.org>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] ARM: Kconfig: missing PAGE_OFFSET=0x70000000 in
  ARCH_MMAP_RND_BITS_MAX
--

commit 174ed2566532b79fdcb5633054674e730fcadf44
Author: Arnd Bergmann <arnd@arndb.de>

ARM: add CONFIG_VMSPLIT_2G_OPT option

This commit adds CONFIG_VMSPLIT_2G_OPT with PAGE_OFFSET=0x70000000 to
provide a full 2 GiB lowmem region on non-LPAE builds, and makes it the
default when CONFIG_HIGHMEM is enabled.

> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index fee6b7435b7ca..17b4da137a8ea 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
[ ... ]
> @@ -1052,6 +1056,7 @@ config PAGE_OFFSET
>  	hex
>  	default PHYS_OFFSET if !MMU
>  	default 0x40000000 if VMSPLIT_1G
> +	default 0x70000000 if VMSPLIT_2G_OPT
>  	default 0x80000000 if VMSPLIT_2G
>  	default 0xB0000000 if VMSPLIT_3G_OPT
>  	default 0xC0000000

[Severity: Low]
Should ARCH_MMAP_RND_BITS_MAX also handle PAGE_OFFSET=0x70000000?

arch/arm/Kconfig:
config ARCH_MMAP_RND_BITS_MAX
	default 14 if PAGE_OFFSET=0x40000000
	default 15 if PAGE_OFFSET=0x80000000
	default 16

With VMSPLIT_2G_OPT, PAGE_OFFSET=0x70000000 falls through to 16 bits
(up to 256 MiB of mmap randomization), which is twice the maximum
allowed for the larger user address space under PAGE_OFFSET=0x80000000.
When KASAN is enabled (shrinking TASK_SIZE to 0x5ce00000) and the stack
gap reaches MAX_GAP, a 16-bit random offset can exceed STACK_TOP -
MAX_GAP in mmap_base() and cause top-down mmap allocations to fall back
to bottom-up.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261112112528.1116405-1-arnd@kernel.org?part=6


      reply	other threads:[~2026-11-13 11:27 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 11:25 [PATCH v2 0/6] mm: highmem cleanups Arnd Bergmann
2026-11-12 11:25 ` [PATCH v2 1/6] ARM: remove support for highmem on VIVT Arnd Bergmann
2026-11-12 13:47   ` Arnd Bergmann
2026-11-13 11:26   ` sashiko-bot
2026-11-13 11:36     ` Arnd Bergmann
2026-11-12 11:25 ` [PATCH v2 2/6] mm: remove ARCH_NEEDS_KMAP_HIGH_GET Arnd Bergmann
2026-11-12 11:48   ` Mike Rapoport
2026-11-12 11:25 ` [PATCH v2 3/6] ARM: drop CONFIG_HIGHPTE support Arnd Bergmann
2026-11-12 11:47   ` Mike Rapoport
2026-11-12 12:22     ` Arnd Bergmann
2026-11-12 11:25 ` [PATCH v2 4/6] mm: drop HIGHPTE support altogether Arnd Bergmann
2026-11-12 11:54   ` Mike Rapoport
2026-11-12 12:33     ` David Hildenbrand (Arm)
2026-11-12 13:26     ` Arnd Bergmann
2026-11-13 10:50       ` David Hildenbrand (Arm)
2026-11-12 11:25 ` [PATCH v2 5/6] arch/*: increase lowmem size to avoid highmem use Arnd Bergmann
2026-11-12 12:00   ` Mike Rapoport
2026-11-13 11:26   ` sashiko-bot
2026-11-12 11:25 ` [PATCH v2 6/6] ARM: add CONFIG_VMSPLIT_2G_OPT option Arnd Bergmann
2026-11-13 11:26   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-212720@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=andreas@gaisler.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=chleroy@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@kernel.org \
    --cc=jgg@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@armlinux.org.uk \
    --cc=ljs@kernel.org \
    --cc=malin.jonsson@est.tech \
    --cc=richard@nod.at \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=willy@infradead.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.