linux-user: no implementation of fchmodat2 system call
Host environment
- Operating system: Arch Linux
- OS/kernel version: GNU/Linux / 6.13.4
- Architecture: x86_64
- QEMU flavor: qemu-aarch64-static
- QEMU version: 10.0.0
- QEMU command line:
QEMU_LD_PREFIX=/<pathTo>/sysroot/ \ qemu-aarch64-static \ -d strace \ /<pathTo>/sysroot/usr/lib/ld-linux-aarch64.so.1 \ /<pathTo>/sysroot/usr/bin/chmod \ +x \ <anyFile>
Emulated/Virtualized environment
- Operating system: Linux
- OS/kernel version: 6.13.4
- Architecture: aarch64
Description of problem
chmod: changing permissions of '<file>': Function not implemented
Steps to reproduce
- Cross-compile glibc (https://github.com/zatrazz/glibc/tree/azanella/clang-rtlib), bash, coreutils for arm{,64}
- chroot into environment
- run
chmod +x <anyFile>(done by gperf autogen.sh)
Additional information
3322628 set_robust_list(0x7fa7d3c72f40,24) = -1 errno=38 (Function not implemented)
3322628 Unknown syscall 293
#define __NR_rseq 293 */usr/include/asm-generic/unistd.h
With -E GLIBC_TUNABLES=glibc.pthread.rseq=0 (thanks Arsen):
3323105 newfstatat(AT_FDCWD,"anyFile",0x000000000005c750,0) = 0
3323105 Unknown syscall 452
#define __NR_fchmodat2 452
It works for a musl-based system which is calling fchmodat (not 2) instead.