[PATCH] arm64: compat: Keep alignment address arithmetic 32-bit
Karl Mehltretter
kmehltretter at gmail.com
Wed Aug 19 11:55:57 PDT 2026
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
More information about the linux-arm-kernel
mailing list