From: "Arnd Bergmann" <arnd@arndb.de>
To: "Ard Biesheuvel" <ardb+git@google.com>, qemu-devel@nongnu.org
Cc: "open list:ARM TCG CPUs" <qemu-arm@nongnu.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Ard Biesheuvel" <ardb@kernel.org>
Subject: Re: [PATCH] target/arm: Avoid target_ulong for physical address lookups
Date: Mon, 23 Sep 2024 11:37:08 +0000 [thread overview]
Message-ID: <fb455d19-e4ed-47a4-a410-f2b3d89f61b7@app.fastmail.com> (raw)
In-Reply-To: <20240923092233.3235856-1-ardb+git@google.com>
On Mon, Sep 23, 2024, at 09:22, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@kernel.org>
>
> target_ulong is typedef'ed as a 32-bit integer when building the
> qemu-system-arm target, and this is smaller than the size of an
> intermediate physical address when LPAE is being used.
>
> Given that Linux may place leaf level user page tables in high memory
> when built for LPAE, the kernel will crash with an external abort as
> soon as it enters user space when running with more than ~3 GiB of
> system RAM.
>
> So replace target_ulong with hwaddr in places where it may carry an
> address value that is not representable in 32 bits.
>
> Fixes: f3639a64f602ea ("target/arm: Use softmmu tlbs for page table walking")
> Reported-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Thanks for the fix, I now confirmed that this addresses the problem.
I had looked at this code before and got confused thinking that these
addresses were ok as 32-bit wide integers.
Arnd
prev parent reply other threads:[~2024-09-23 11:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 9:22 [PATCH] target/arm: Avoid target_ulong for physical address lookups Ard Biesheuvel
2024-09-23 10:03 ` Richard Henderson
2024-09-23 11:37 ` Arnd Bergmann [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=fb455d19-e4ed-47a4-a410-f2b3d89f61b7@app.fastmail.com \
--to=arnd@arndb.de \
--cc=ardb+git@google.com \
--cc=ardb@kernel.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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;
as well as URLs for NNTP newsgroup(s).