qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philippe.mathieu.daude@gmail.com>
To: WANG Xuerui <xen0n@gentoo.org>, qemu-devel@nongnu.org
Cc: "Andreas K . Hüttel" <dilfridge@gentoo.org>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH for-7.0] linux-user: Fix syscall parameter handling for MIPS n32
Date: Sun, 20 Mar 2022 23:08:53 +0100	[thread overview]
Message-ID: <c86aa778-4423-bef4-3303-2c62568cd9d4@gmail.com> (raw)
In-Reply-To: <20220320052259.1610883-1-xen0n@gentoo.org>

On 20/3/22 06:22, WANG Xuerui wrote:
> The MIPS n32 ABI is basically n64 with the address space (i.e. pointer
> width) shrinked to 32 bits. Meanwhile the current code treats it as
> o32-like based on TARGET_ABI_BITS, which causes problems with n32
> syscalls utilizing 64-bit offsets, like pread64, affecting most (if not
> all) recently built n32 binaries.
> 
> This partially solves issue #909 ("qemu-mipsn32(el) user mode emulator
> fails to execute any recently built n32 binaries"); with this change
> applied, the built qemu-mipsn32el is able to progress beyond the
> pread64, and finish _dl_start_user for the "getting ld.so load libc.so"
> case. The program later dies with SIGBUS, though, due to _dl_start_user
> not maintaining stack alignment after removing ld.so itself from argv,
> and qemu-user starting to enforce alignment recently, but that is
> orthogonal to the issue here; the more common case of chrooting is
> working, verified with my own-built Gentoo n32 sysroot. (Depending on
> the exact ISA used, one may have to explicitly specify QEMU_CPU, which
> is the case for my chroot.)
> 
> Buglink: https://gitlab.com/qemu-project/qemu/-/issues/909

Very nice analysis there!

"Buglink" doesn't seem to match GitLab autoclose regexp:
https://docs.gitlab.com/ee/administration/issue_closing_pattern.html#change-the-issue-closing-pattern

> Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
> Cc: Laurent Vivier <laurent@vivier.eu>
> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Cc: Andreas K. Hüttel <dilfridge@gentoo.org>
> ---
> 
> P.S. This patch is done with my Gentoo hat on, so I'm not using my
> usual xen0n.name address. I'd like to add a mailmap entry for correct
> shortlog display though, but it seems there's no category for "merely
> preference" mappings yet. What should I do in this case?

The last section seems to match your case:

   # Also list preferred name forms where people have changed their
   # git author config, or had utf8/latin1 encoding issues.

>   linux-user/user-internals.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


  parent reply	other threads:[~2022-03-20 22:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-20  5:22 [PATCH for-7.0] linux-user: Fix syscall parameter handling for MIPS n32 WANG Xuerui
2022-03-20 18:03 ` Richard Henderson
2022-03-20 22:08 ` Philippe Mathieu-Daudé [this message]
2022-03-20 22:20 ` 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=c86aa778-4423-bef4-3303-2c62568cd9d4@gmail.com \
    --to=philippe.mathieu.daude@gmail.com \
    --cc=dilfridge@gentoo.org \
    --cc=f4bug@amsat.org \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=xen0n@gentoo.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).