]> git.proxmox.com Git - mirror_qemu.git/commit
linux-user: Implement faccessat2
authorWANG Xuerui <xen0n@gentoo.org>
Sun, 9 Oct 2022 06:08:13 +0000 (14:08 +0800)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 21 Oct 2022 15:46:19 +0000 (17:46 +0200)
commit35a2c85f7d691db7aa2c47181902ac87478eef7a
tree8cf02bc95d6d1b5cbc01f1701fe33bd275e739e3
parented98cdecf8dabce137f693641777503112d884b3
linux-user: Implement faccessat2

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>
Message-Id: <20221009060813.2289077-1-xen0n@gentoo.org>
[lv: removing defined(__NR_faccessat2) in syscall.c,
     adding defined(TARGET_NR_faccessat2) on print_faccessat()]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/strace.c
linux-user/strace.list
linux-user/syscall.c