All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl Mehltretter <kmehltretter@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	 Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	 Ard Biesheuvel <ardb@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: compat: Keep alignment address arithmetic 32-bit
Date: Wed, 19 Aug 2026 20:55:57 +0200	[thread overview]
Message-ID: <aoX6wpJjMS1vtlVY@gmail.com> (raw)
In-Reply-To: <4078f942-e29a-4f6f-b6fc-780e8c6d6874@app.fastmail.com>

On Wed, Aug 19, 2026 at 01:19:20PM +0100, Arnd Bergmann wrote:
> 
> I don't see yet why 64K_PAGES makes a difference. I had
> expected TASK_SIZE to be 4GiB regardless of the page size, and
> the top page (but not the bottom page) to be reachable from normal
> userspace.

There is a special case in arch/arm64/include/asm/processor.h:

#if defined(CONFIG_ARM64_64K_PAGES) && defined(CONFIG_KUSER_HELPERS)
#define TASK_SIZE_32		UL(0x100000000)
#else
#define TASK_SIZE_32		(UL(0x100000000) - PAGE_SIZE)
#endif

Only ARM64_64K_PAGES with KUSER_HELPERS gives compat tasks the
full 4 GiB. The 64K kuser mapping then occupies the last
page.

I'll send a v2 soon.

Karl

  reply	other threads:[~2026-08-19 18:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17  0:02 [PATCH] arm64: compat: Keep alignment address arithmetic 32-bit Karl Mehltretter
2026-08-17  9:15 ` Arnd Bergmann
2026-08-18  3:22   ` Karl Mehltretter
2026-08-18  7:31     ` Arnd Bergmann
2026-08-19  4:56       ` Karl Mehltretter
2026-08-19 11:19         ` Arnd Bergmann
2026-08-19 18:55           ` Karl Mehltretter [this message]
2026-08-19 20:27             ` Arnd Bergmann

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=aoX6wpJjMS1vtlVY@gmail.com \
    --to=kmehltretter@gmail.com \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=will@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.