All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org,
	John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Subject: Re: [PATCH] linux-user: Ensure mmap_min_addr is non-zero
Date: Mon, 27 Jul 2020 13:19:20 +0200	[thread overview]
Message-ID: <ed16b937-9f82-8221-0764-77e7fddbed96@vivier.eu> (raw)
In-Reply-To: <20200724212314.545877-1-richard.henderson@linaro.org>

Le 24/07/2020 à 23:23, Richard Henderson a écrit :
> When the chroot does not have /proc mounted, we can read neither
> /proc/sys/vm/mmap_min_addr nor /proc/sys/maps.
> 
> The enforcement of mmap_min_addr in the host kernel is done by
> the security module, and so does not apply to processes owned
> by root.  Which leads pgd_find_hole_fallback to succeed in probing
> a reservation at address 0.  Which confuses pgb_reserved_va to
> believe that guest_base has not actually been initialized.
> 
> We don't actually want NULL addresses to become accessible, so
> make sure that mmap_min_addr is initialized with a non-zero value.
> 
> Buglink: https://bugs.launchpad.net/qemu/+bug/1888728
> Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  linux-user/main.c | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 

Richard, do you want to add this fix in one of your branches PR?

In this case:
Acked-by: Laurent Vivier <laurent@vivier.eu>

Otherwise I can prepare a small one for linux-user, adding one or two
fixes...

Thanks,
Laurent


  parent reply	other threads:[~2020-07-27 11:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24 21:23 [PATCH] linux-user: Ensure mmap_min_addr is non-zero Richard Henderson
2020-07-27 11:09 ` John Paul Adrian Glaubitz
2020-07-27 11:19 ` Laurent Vivier [this message]
2020-07-27 19:41   ` Richard Henderson
2020-07-27 20:03 ` Laurent Vivier

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=ed16b937-9f82-8221-0764-77e7fddbed96@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=alex.bennee@linaro.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --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 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.