qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Helge Deller <deller@gmx.de>, WANG Xuerui <xen0n@gentoo.org>,
	qemu-devel@nongnu.org
Cc: "Laurent Vivier" <laurent@vivier.eu>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Andreas K . Hüttel" <dilfridge@gentoo.org>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH] linux-user: Implement faccessat2
Date: Tue, 18 Oct 2022 12:58:22 +0300	[thread overview]
Message-ID: <a69ae272-b0a3-cea3-b9a7-a678af274c2a@msgid.tls.msk.ru> (raw)
In-Reply-To: <f47945b7-afce-f0e3-2ca9-6c6cd119cae7@gmx.de>

10.10.2022 11:53, Helge Deller wrote:
> On 10/9/22 08:08, WANG Xuerui wrote:
>> User space has been preferring this syscall for a while, due to its
>> closer match with C semantics, and newer platforms such as LoongArch
>> apparently have libc implementations that don't fallback to faccessat
>> so normal access checks are failing without the emulation in place.
>>
>> Tested by successfully emerging several packages within a Gentoo loong
>> stage3 chroot, emulated on amd64 with help of static qemu-loongarch64.
>>
>> Reported-by: Andreas K. Hüttel <dilfridge@gentoo.org>
>> Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
>> ---
>>   linux-user/strace.list | 3 +++
>>   linux-user/syscall.c   | 9 +++++++++
>>   2 files changed, 12 insertions(+)
> 
> There were two similar approaches from Richard and me:
> https://lore.kernel.org/qemu-devel/20220729201414.29869-1-richard.henderson@linaro.org/#t
> and
> https://lore.kernel.org/qemu-devel/YzLdcnL6x646T61W@p100/

So can we combine the 3 and actually implement it for good? :)

For loongarch64 users this has become essential, because this is a
new enough arch so that userspace does not bother using older syscalls,
in this case it uses faccessat2() for everything, and simplest programs
fail under qemu due to no fallback whatsoever.

Thanks,

/mjt


  reply	other threads:[~2022-10-18 10:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-09  6:08 [PATCH] linux-user: Implement faccessat2 WANG Xuerui
2022-10-10  8:53 ` Helge Deller
2022-10-18  9:58   ` Michael Tokarev [this message]
2022-10-18 13:05     ` Luca Bonissi
2022-10-21 15:37 ` Laurent Vivier
  -- strict thread matches above, loose matches on Subject: below --
2022-07-29 20:14 Richard Henderson
2022-07-31 15:38 ` Richard Henderson

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=a69ae272-b0a3-cea3-b9a7-a678af274c2a@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=deller@gmx.de \
    --cc=dilfridge@gentoo.org \
    --cc=f4bug@amsat.org \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).