From: Richard Henderson <richard.henderson@linaro.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>,
Laurent Vivier <laurent@vivier.eu>,
Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] linux-user: Tolerate CONFIG_LSM_MMAP_MIN_ADDR
Date: Tue, 22 Oct 2024 07:33:31 -0700 [thread overview]
Message-ID: <c3411cb3-6669-459d-834f-1089e52c77d3@linaro.org> (raw)
In-Reply-To: <5a6ec294c6da14a2a65d3669ac4dcdc79934c452.camel@linux.ibm.com>
On 10/22/24 02:50, Ilya Leoshkevich wrote:
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -2898,7 +2898,7 @@ static uintptr_t pgb_try_itree(const PGBAddrs
> *ga, uintptr_t base,
> static uintptr_t pgb_find_itree(const PGBAddrs *ga, IntervalTreeRoot
> *root,
> uintptr_t align, uintptr_t brk)
> {
> - uintptr_t last = mmap_min_addr;
> + uintptr_t last = sizeof(uintptr_t) == 4 ? MiB : GiB;
> uintptr_t base, skip;
>
> while (true) {
>
> But just for my understanding, what is wrong with the current approach?
> The intention here is to fix the weird case without affecting the happy
> path.
Once the identity map fails, the magnitude of guest_base does not matter. I've always
been a bit uncomfortable with butting right up against mmap_min_addr.
> It also looks natural to try the fallback once the normal
> handling fails.
The normal path is supposed to have complete knowledge of the address space. There should
be no need to fall back to blind probing. To me that does not seem natural at all.
r~
prev parent reply other threads:[~2024-10-22 14:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-21 12:17 [PATCH] linux-user: Tolerate CONFIG_LSM_MMAP_MIN_ADDR Ilya Leoshkevich
2024-10-22 2:34 ` Richard Henderson
2024-10-22 9:50 ` Ilya Leoshkevich
2024-10-22 14:33 ` Richard Henderson [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=c3411cb3-6669-459d-834f-1089e52c77d3@linaro.org \
--to=richard.henderson@linaro.org \
--cc=iii@linux.ibm.com \
--cc=laurent@vivier.eu \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.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).