From: "Arnd Bergmann" <arnd@arndb.de>
To: "Karl Mehltretter" <kmehltretter@gmail.com>
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 13:19:20 +0200 [thread overview]
Message-ID: <4078f942-e29a-4f6f-b6fc-780e8c6d6874@app.fastmail.com> (raw)
In-Reply-To: <aoU2ezSYVbOw0hun@gmail.com>
On Wed, Aug 19, 2026, at 06:56, Karl Mehltretter wrote:
> On Tue, Aug 18, 2026 at 09:31:14AM +0100, Arnd Bergmann wrote:
>> On Tue, Aug 18, 2026, at 05:22, Karl Mehltretter wrote:
> I now used:
>
> CONFIG_EXPERT=y
> CONFIG_ARM64_64K_PAGES=y
> CONFIG_COMPAT=y
> CONFIG_KUSER_HELPERS=y
> CONFIG_COMPAT_ALIGNMENT_FIXUPS=y
> CONFIG_DEFAULT_MMAP_MIN_ADDR=0
>
> With 64K pages and KUSER_HELPERS, compat TASK_SIZE is 4 GiB. The last
> 64K is the kuser mapping. The test maps the first 64K at zero, so memory
> exists on both sides of the wrap.
Hopefully nobody actually uses CONFIG_DEFAULT_MMAP_MIN_ADDR=0.
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.
> On native ARM32, the kernel is mapped at the top of the address space.
> Userspace cannot reach the 4 GiB wrap.
right
> So v2 is enough for the original decrementing LDM/STM bug. v1 does not
> add a working wrap case by itself. I think the small v2 fix makes more
> sense. v1+ would be the theoretically complete version for AArch32 wrap
> handling...
>
> Am I getting this right now, or am I still missing a case?
That sounds good, v2 should be all we need then.
Arnd
next prev parent reply other threads:[~2026-08-19 11:20 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 [this message]
2026-08-19 18:55 ` Karl Mehltretter
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=4078f942-e29a-4f6f-b6fc-780e8c6d6874@app.fastmail.com \
--to=arnd@arndb.de \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=kmehltretter@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox